<template>
	<view class="chatRoom" :style="'background: url('+bgImg+') no-repeat center right;background-size: 100% 100%;'">
		<div id="app">

			<!-- 	<button type="default" @click="shengbozhixing()" style="margin-top: 50upx;"> 声波</button>
			<!-- {{$global.getImageUrl('animate/guard1.svga')}} -->
			<!-- 
			<view class="">
				<view style="height:100rpx;">
				</view>
				<button type="default" @click="guolvmxms()"> 麦下</button>
			</view> -->
			<!-- <lpainter :board="base" @success="onsuccess" :isRenderImage="true" /> -->

			<!-- 跟随动画的跟随 -->
			<view class="gensuidh">
				
				<image style="width:190upx;height:auto;" :animation="animationData" :src="gensuipng" mode="widthFix">
				</image>
			</view>
			<div class="catBox" :style="'margin-top:'+statusBarHeight+'px'">
				<view style="display: flex;align-items: center;position: relative;">
					<image :src="$BASE_URL+'/st/mini/static/img/chatRoomDetails/jiantou.png'" @click="goBack"
						style="width:32upx;height:32upx;transform: rotate(180deg); padding:15upx; z-index: 9999; ">
					</image>
					<!-- <view v-if="chatRoomBeckoning[0]!=undefined" class="meili"
						:style="maxSeatNum==0?'background-image: linear-gradient(207deg, #FFAF00 0%, #FF6E00 100%);':minSeatNum==0?'background-image: linear-gradient(207deg, #4D3DFF 0%, #824CFD 100%);':''">
						<image :src="maxSeatNum==0?mvp:minSeatNum==0?low:''" mode=""
							style="width: 85upx;height: 43upx;position: absolute;top: -30upx;left:25upx;"></image>
						<image style="width: 16upx;height: 14upx;margin-left: 5upx;"
							:src="maxSeatNum==0?$BASE_URL+'/st/mini/static/img/chatRoomDetails/mvpheart.png':$BASE_URL+'/st/mini/static/img/chatRoomDetails/meilizhi.png'"
							mode="">
						</image>
						<text style="flex: 1;text-align: center;">{{chatRoomBeckoning[0]}}</text>
					</view>
 -->
					<!-- 
					<div class="catBoxItem1" style="z-index: 9999;" @click="zblb==33? liwuxx():''">
						<image :src="hBgImg" class="hBg"></image>
						<view style="15upx">
						</view>
						<view style="width:230upx;">
							<p class="roomName" v-if="roomName.length<10">{{roomName}}</p>
							<p class="roomName" v-else>
								<text-scroll :text="roomName"></text-scroll>
							</p>
							<p style="display: flex;">
								<view class="roomId">ID：{{identityId}} </view>
								<view class="roomId" style="margin-left:10upx;">贡献值：{{zsNum}}</view>
							</p>
						</view>
						<view
							style="width: 74upx;height: 30upx;line-height:30upx;text-align:center;background: #34DCC2;font-size: 20upx;color: #FFFFFF;border: 1px solid #FFFFFF;border-radius: 15upx;margin-left:auto;position: relative;">
							<image :src="$BASE_URL+'/st/mini/static/img/chatRoomDetails/lingxian.png'" mode=""
								style="width: 24upx;height: 38upx;position: absolute;left: -15upx;top: -7upx;">
							</image>
					
							{{onLineUser}}
						</view>
						<view style="width:5upx;">
						</view>
						<view @click.stop="ccgzjjk" v-if="zblb==33 && dqisAttention==2"
							style="width:80upx;height:60upx; display: flex;z-index: 99999;  justify-content: center; align-items: center;  ">
							<image style="width:80upx;height: auto;"
								src="https://php.zgsj1.com/upload_video/20211104/6d168d61d6545d7d6785c484fe2105e2.png"
								mode="widthFix"></image>
						</view>

					</div>

 -->

					<!-- 
					<view
						style="background: rgba(0, 0, 0, 0.2);   height:75upx;border-radius: 35upx; display: flex; align-items: center;"
						@click="zblb==33? liwuxx():''">
						<view style="width:3%;">
						</view>

						<view style="display:flex; flex-flow:column; align-items: center; justify-content: center; ">
							<image :src="hBgImg" style="width:50upx; height: 50upx; border-radius: 50%; "></image>
							<image :src="maxSeatNum==0?mvp:minSeatNum==0?low:''" mode="widthFix"
								style="width:55upx;height:auto; margin-top:-25upx;"></image>
							<view v-if="chatRoomBeckoning[0]!=undefined" class="meilis"
								:style="maxSeatNum==0?'background-image: linear-gradient(207deg, #FFAF00 0%, #FF6E00 100%);':minSeatNum==0?'background-image: linear-gradient(207deg, #4D3DFF 0%, #824CFD 100%);':'background: rgba(0, 0, 0, 0.6);'">
								<view style="width:10upx;"></view>
								<image style="width:20upx;height:auto;"
									:src="maxSeatNum==0?$BASE_URL+'/st/mini/static/img/chatRoomDetails/mvpheart.png':$BASE_URL+'/st/mini/static/img/chatRoomDetails/meilizhi.png'"
									mode="widthFix">
								</image>
								<view style="">{{chatRoomBeckoning[0]}}</view>
								<view style="width:10upx;"></view>
							</view>
						</view>
						<view style="color: #FFFFFF; transform: scale(0.8);width:390upx;margin-left:-30upx
						;">
							<view style="font-size:25upx;">
								{{roomName}}
							</view>
							<view style="display: flex;">
								<view class="roomId">ID：{{identityId}} </view>
								<view class="roomId">贡献值：{{zsNum}}</view>
							</view>
						</view>

					

						<view
							style=" margin-left:-40upx; height: 30upx;line-height:35upx;text-align:center;background: #34DCC2;font-size:18upx;color: #FFFFFF;border: 1px solid #FFFFFF;border-radius: 15upx; display: flex; align-items: center; ">
							<view style="width:10%;"></view>
							<image :src="$BASE_URL+'/st/mini/static/img/chatRoomDetails/lingxian.png'" mode="widthFix"
								style="width:30upx;height:auto;">
							</image>
	
							<view style="width:5%;"></view>
							<view class="">
								{{onLineUser}}
							</view>
							<view style="width:15%;"></view>
						</view>
						<view @click.stop="ccgzjjk" v-if="zblb==33 && dqisAttention==2"
							style="width:80upx;height:60upx; display: flex;z-index: 99999;  justify-content: center; align-items: center;  ">
							<image style="width:80upx;height: auto;"
								src="https://php.zgsj1.com/upload_video/20211104/6d168d61d6545d7d6785c484fe2105e2.png"
								mode="widthFix"></image>
						</view>
						<view style="width:3%;">
						</view>
					</view>
					 -->
					<!-- 房间信息头 -->
					<view
						style=" background: rgba(0, 0, 0, 0.2);height: 70upx;border-radius:50upx; display: flex;align-items: center;position:absolute;left:50upx;z-index: 999;"
						@click="sendMine(1)">

						<view class="lefttxbf"
							style="flex-flow: column;display:flex;align-items: center;margin-left:1.5%;">

							<image :src="hBgImg" style="width:50upx; height: 50upx; border-radius: 50%;  "></image>

							<image :src="maxSeatNum==0?mvp:minSeatNum==0?low:''" mode="widthFix"
								style="width:55upx;height:auto; margin-top:-30upx;"></image>
							<view v-if="chatRoomBeckoning[0]!=undefined" class="meilis"
								:style="maxSeatNum==0?'background-image: linear-gradient(207deg, #FFAF00 0%, #FF6E00 100%);':minSeatNum==0?'background-image: linear-gradient(207deg, #4D3DFF 0%, #824CFD 100%);':'background: rgba(0, 0, 0, 0.6);'">
								<view style="width:10upx;"></view>
								<image style="width:20upx;height:auto;"
									:src="maxSeatNum==0?$BASE_URL+'/st/mini/static/img/chatRoomDetails/mvpheart.png':$BASE_URL+'/st/mini/static/img/chatRoomDetails/meilizhi.png'"
									mode="widthFix">
								</image>
								<view style="">{{chatRoomBeckoning[0]}}</view>
								<view style="width:10upx;"></view>
							</view>
						</view>
						<view style="width:15upx;"></view>

						<view class="autozjbf" style="flex-flow: column;display:flex;color: #FFFFFF;font-size:22upx;">

							<view style=" width:240upx;">
								<p class="roomName" v-if="roomName.length<10">{{roomName}}</p>
								<p class="roomName" v-else>
									<text-scroll :text="roomName"></text-scroll>
								</p>
							</view>
							<view style="display: flex;font-size:16upx;">
								<p style="white-space: nowrap;"> ID:{{identityId}} </p>
								<p style="white-space: nowrap;margin-left: 8upx;"> 贡献值:{{zsNum}}
								</p>
							</view>
						</view>


						<!-- margin-left:-10upx; transform: scale(0.8);/ -->

						<view class="rightbf">

							<view
								style="  height: 30upx;line-height:35upx;text-align:center;background: #34DCC2;font-size:18upx;color: #FFFFFF;border: 1px solid #FFFFFF;border-radius: 15upx; display: flex; align-items: center; ">
								<view style="width:10%;"></view>
								<image :src="$BASE_URL+'/st/mini/static/img/chatRoomDetails/lingxian.png'"
									mode="widthFix" style="width:30upx;height:auto;">
								</image>
								<!-- 房间热度值 -->
								<view style="width:5%;"></view>
								<view class="">
									{{onLineUser}}
								</view>
								<view style="width:15%;"></view>
							</view>

						</view>

						<view>
							<!-- {{dqisAttention}} -->
							<!--v-if="  zblb==33  &&  dqisAttention==2" -->
							<view @click.stop="ccgzjjk" v-if="dqisAttention==2"
								style="width:80upx;height:60upx; display: flex;z-index: 99999;  justify-content: center; align-items: center;  ">
								<image style="width:80upx;height: auto;"
									src="https://webapp.test.shenghua6.cn/st/mini/static/img/xcxydy/tuanzhus.png"
									mode="widthFix"></image>
							</view>


						</view>
						<view style="width:20upx;">

						</view>

					</view>






				</view>











				<!-- 玩儿法 -->

				<view class="playCon" @click="wanShow=true" v-if="!wanfa">
					<image style="z-index: 9999;" class="playimg"
						:src="$BASE_URL+'/st/mini/static/img/chatRoomDetails/wanfa.png'" mode="">
					</image>
					<text style="z-index: 9999;">玩法</text>
				</view>

				<view style="height:45px;" v-else>
				</view>


				<!-- <button type="default" @click="sssss"> _this.client.leave();</button> -->



				<!-- <view class="" @click="qxguanzhusss()"  >
	取消关注
</view>
 -->

				<!-- 块元素宽度被子元素撑开自适应 -->
				<!-- 子元素达到 一定条数 触发 可滑动 -->
				<!-- {{chatData.length}} -->

				<div class="catBoxItem3 shangmai" style="">
					<ul v-if="zblb==27">
						<li v-for="(list,index) in chatData" :key="index"
							@click="changeDown(list.headImg,list.userId,index+1,list.seatState)" v-if="index<zmaiwei">
							<!--  -->
							<p class="jia txImg" v-if="index!=7" style="position: relative;">
								<image :src="$BASE_URL+'/st/mini/static/img/chatRoomDetails/jia.png'" mode="" class="tx"
									v-if="(list.headImg==undefined||list.headImg=='')&&list.seatState!=2">
								</image>
								<image :src="$BASE_URL+'/st/mini/static/img/chatRoomDetails/suo.png'" mode="" class="tx"
									v-if="list.seatState==2"></image>
								<!-- 修改头像是否动图 影响加载速度 -->
								<!-- 波环展示位置 -->
								<!-- {{pinjieid(index)}} -->
								<canvas v-if="list.headImg!=undefined&&list.headImg!=''" :id="pinjieid(index)" type="2d"
									style=" width:100upx;height:100upx;position:absolute;left:-7upx;padding:50upx;margin-top:-53upx;">
								</canvas>

								<image
									:src="$global.getImageUrl(list.headImg+'?x-oss-process=image/bright,15/resize,m_fill,h_150,w_150', 'https://ourydcimage.shenghua6.cn')"
									mode="" style="position: relative;" class="tx"
									v-if="list.headImg!=undefined&&list.headImg!=''"></image>
								<!-- +'?x-oss-process=image/bright,15/resize,m_fill,h_250,w_250' -->
								<view v-if="chatRoomBeckoning[0]!=undefined"
									:style="index==(maxSeatNum-1)?' ;background-image: linear-gradient(207deg, #FFAF00 0%, #FF6E00 100%);':index==(minSeatNum-1)?'background-image: linear-gradient(207deg, #4D3DFF 0%, #824CFD 100%);':''"
									style=" position: relative;  width:120upx;line-height:30upx;border-radius: 13upx;font-size:18upx;color: #FFD399;background: rgba(0,0,0,0.6);display: flex;align-items: center;margin: 0 auto;margin-top: -15upx;">
									<image :src="index==(maxSeatNum-1)?mvp:index==(minSeatNum-1)?low:''" mode=""
										style="width: 85upx;height: 43upx;position: absolute;top:-35upx;left:20upx;z-index: 1;">
									</image>
									<image style="width: 16upx;height: 14upx;margin-left: 5upx;"
										:src="index==(maxSeatNum-1)?$BASE_URL+'/st/mini/static/img/chatRoomDetails/mvpheart.png':$BASE_URL+'/st/mini/static/img/chatRoomDetails/meilizhi.png'"
										mode="">
									</image>
									<text
										style="flex: 1;">{{index==0?chatRoomBeckoning[1]:index==1?chatRoomBeckoning[2]:index==2?chatRoomBeckoning[3]:index==3?chatRoomBeckoning[4]:index==4?chatRoomBeckoning[5]:index==5?chatRoomBeckoning[6]:index==6?chatRoomBeckoning[7]:''}}</text>
								</view>
							</p>
							<p class="jia txImg" v-else style="position: relative;">
								<image :src="maxSeatNum==8?mvp:minSeatNum==8?low:''" mode=""
									style="width: 85upx;height: 43upx;position: absolute;top:55upx;left:55upx;z-index: 1;">
								</image>
								<image :src="$BASE_URL+'/st/mini/static/img/chatRoomDetails/boss.png'" mode=""
									class="tx" v-if="(list.headImg==undefined||list.headImg=='')&&list.seatState!=2">
								</image>
								<image :src="$BASE_URL+'/st/mini/static/img/chatRoomDetails/suo.png'" mode="" class="tx"
									v-if="list.seatState==2"></image>
								<image :src="$global.getImageUrl(list.headImg, 'https://ourydcimage.shenghua6.cn')" mode=""
									class="tx" v-if="list.headImg!=undefined&&list.headImg!=''"></image>
								<view v-if="chatRoomBeckoning[0]!=undefined"
									:style="maxSeatNum==8?'background-image: linear-gradient(207deg, #FFAF00 0%, #FF6E00 100%);':minSeatNum==8?'background-image: linear-gradient(207deg, #4D3DFF 0%, #824CFD 100%);':''"
									style=" position: relative; width:120upx;line-height:30upx;border-radius: 13upx;font-size: 16upx;color: #FFD399;background: rgba(0,0,0,0.6);display: flex;align-items: center;margin: 0 auto;margin-top: -15upx;">
									<image style="width: 16upx;height: 14upx;margin-left: 5upx;"
										:src="maxSeatNum==8?$BASE_URL+'/st/mini/static/img/chatRoomDetails/mvpheart.png':$BASE_URL+'/st/mini/static/img/chatRoomDetails/meilizhi.png'"
										mode="">
									</image>
									<text style="flex: 1; ">{{chatRoomBeckoning[8]}}</text>
								</view>
							</p>
							<p class="nichen" v-if="index!=7">{{list.nickName!=undefined?list.nickName:''}}</p>
							<p class="nichen" v-if="index==7" style="color: #FFDE00;">
								{{list.nickName!=undefined? '老板'+ list.nickName:'老板位'}}
								<!-- 老板位 -->
							</p>
						</li>
					</ul>


					<!-- 直播厅的 头像展示 -->
					<!-- 带波环 -->
					<view class="zjikdti" v-if="zblb == 33 && kqpk==false">
						<canvas id="zbgh" type="2d" style=" width:300upx;height:300upx;position:absolute; ">
						</canvas>
						<image class="zhiboimgtx" :src="hBgImg" mode="" @click="liwuxx()"></image>
					</view>



					<!-- 直播pk -->
					<!-- -->
					<view class="zbpk" v-if="zblb == 33 && kqpk==true">
						<view class="pkbj">
							<image @click="pkguiz"
								style="width:200upx; height: auto; margin: 0 auto; margin-top: -10upx; "
								src="https://webapp.test.shenghua6.cn/st/mini/static/img/xcxydy/pkguz.png" mode="widthFix">
							</image>



							<view style="width: 100%; margin: 0 auto; display: flex; ">
								<!-- 左边 -->
								<view
									style="width:44%;height: 200upx; display: flex; align-items:center;justify-content: center; ">
									<image
										style="width: 130upx; height:auto; border-radius: 50%; position: absolute; z-index: 999; border: 4upx solid #067EE7; "
										:src="hBgImg" mode="widthFix" @click="liwuxx"></image>
									<canvas id="wofangpk" type="2d"
										style=" width:200upx;height:200upx; position: absolute;   ">
									</canvas>


									<!-- pk结果 -->
									<!-- 胜利 -->


									<image class="jieguot" v-if="pkresult==1"
										src="https://webapp.test.shenghua6.cn/st/mini/static/img/xcxydy/shengli.png"
										mode="widthFix"></image>
									<!-- 失败 -->
									<image v-if="pkresult==2" class="jieguot"
										src="https://webapp.test.shenghua6.cn/st/mini/static/img/xcxydy/shibai.png"
										mode="widthFix"></image>
									<!-- 平局 -->

									<image class="jieguot" v-if="pkresult==3"
										src="https://webapp.test.shenghua6.cn/st/mini/static/img/xcxydy/pingjus.png"
										mode="widthFix"></image>






								</view>
								<view style="width: 10%;">

								</view>
								<!-- 右边 -->
								<view
									style=" position: relative; width:44%;height: 200upx; display: flex; align-items:center;justify-content: center; ">
									<image
										style="width: 130upx; height:auto; border-radius: 50%; position: absolute; z-index: 999; border: 4upx solid #F05E98; "
										:src="$global.getImageUrl(pklist.toHeadImg+'?x-oss-process=image/bright,15/resize,m_fill,h_150,w_150', 'https://ourydcimage.shenghua6.cn')"
										mode="widthFix" @click="dakaibanping()"></image>

									<canvas id="duifangpk" type="2d"
										style=" width:200upx;height:200upx; position: absolute;    ">
									</canvas>


									<!-- pk结果 -->
									<!-- 胜利 -->

									<image class="jieguot" v-if="pkresult==2"
										src="https://webapp.test.shenghua6.cn/st/mini/static/img/xcxydy/shengli.png"
										mode="widthFix"></image>
									<!-- 失败 -->
									<image v-if="pkresult==1" class="jieguot"
										src="https://webapp.test.shenghua6.cn/st/mini/static/img/xcxydy/shibai.png"
										mode="widthFix"></image>
									<!-- 平局 -->

									<image class="jieguot" v-if="pkresult==3"
										src="https://webapp.test.shenghua6.cn/st/mini/static/img/xcxydy/pingjus.png"
										mode="widthFix"></image>

								</view>

							</view>

							<view style="width: 100%; margin: -30upx auto; display: flex; ">

								<view
									style="width:44%;height: 50upx; display: flex; align-items:center;justify-content: center; ">
									<view class="wdmz">{{managerNickName}} </view>
								</view>
								<view style="width: 10%;">

								</view>
								<view
									style="width:44%;height:50upx; display: flex; align-items:center;justify-content: center; ">

									<view class="wdmz">{{pklist.toNickName}} </view>


								</view>

							</view>




							<view class="pkduikang">
								<!-- {{pklist.status}} // `0 = 没有PK  1 = 匹配中 2 = 即将开始 3 = 匹配失败 4 = PK中 5 = 惩罚时间` -->

								<view
									style="color: #FFFFFF; display: flex;align-items:center;justify-content: center;  "
									@click="gongxianb">



									<view style="padding-top:5upx ;">

										<image v-if="pklist.status==4"
											style=" width:40upx;height: auto;margin-left: -15upx;"
											src="https://webapp.test.shenghua6.cn/st/mini/static/img/xcxydy/psk.png"
											mode="widthFix"></image>


										<view v-if="pklist.status==5" style="font-size: 22upx;	transform: scale(0.8);">
											惩罚时间
										</view>

									</view>



									<view style="font-size: 22upx;	transform: scale(0.9);">
										{{min}} : {{sec}}
									</view>


								</view>
								<!-- 12122

								<!-- {{pressWidth}} -->
								<view class="data_progress__1PKMR">
									<!-- {{pressWidth}} -->
									<view class="data_proLeft__1gtzQ" :style="{width:pressWidth}">
									</view>
									<image style="width: 30upx;margin-left: -8px;"
										src="https://webapp.test.shenghua6.cn/st/mini/static/img/xcxydy/zhongjian.png"
										mode="widthFix"></image>


								</view>


								<view class="pkt">
									<view style="width:20upx;">

									</view>
									<view class="">
										我方 {{fromContribut}}
										<!-- <text style="color: #FFFFFF;">{{pressWidth}}</text> -->
									</view>

									<view style="margin-left: auto;">
										{{toContribut}} 对方
									</view>
									<view style="width:20upx;">

									</view>

								</view>


							</view>


							<view class="pkguanzhong">

								<!-- src="https://php.zgsj1.com/upload_video/20211115/91174d823581531356c5b263f068d7b5.png"> -->


								<view class="pkllleft" @click="gongxianb(1)">

									<view class="pkgztx" v-if="fromList.length>=4">
										<view style="text-align: center; position:relative;  ">

											<image v-if="fromList.length>=4" class="gztxlb"
												:src="$global.getImageUrl(fromList[3].headImg+'?x-oss-process=image/bright,15/resize,m_fill,h_80,w_80', 'https://ourydcimage.shenghua6.cn')"
												mode=""></image>

											<image v-else class="gztxlb" style="border:2upx solid #067EE7;"
												src="https://webapp.test.shenghua6.cn/st/mini/static/img/xcxydy/lanse.png">
											</image>

											<view class="pkdy" v-if="fromList[3].isMvp == 2">
												4

											</view>

											<view class="pkdy" style="background: none;" v-if="fromList[3].isMvp == 1">
												<image style="width:50upx; height: auto;  position: absolute;"
													src="https://webapp.test.shenghua6.cn/st/mini/static/img/xcxydy/mvpx.png"
													mode="widthFix"></image>

											</view>
										</view>

									</view>

									<view class="pkgztx" v-else>
										<view style="text-align: center; position:relative;  ">
											<image class="gztxlb" style="border:2upx solid #067EE7;"
												src="https://webapp.test.shenghua6.cn/st/mini/static/img/xcxydy/lanse.png">
											</image>

											<view class="pkdy">
												4

											</view>
										</view>
									</view>


									<view class="pkgztx" v-if="fromList.length>=3">
										<view style="text-align: center; position:relative;  ">

											<image v-if="fromList.length>=3" class="gztxlb"
												:src="$global.getImageUrl(fromList[2].headImg+'?x-oss-process=image/bright,15/resize,m_fill,h_80,w_80', 'https://ourydcimage.shenghua6.cn')"
												mode=""></image>

											<image v-else class="gztxlb" style="border: 2upx solid #067EE7;"
												src="https://webapp.test.shenghua6.cn/st/mini/static/img/xcxydy/lanse.png">
											</image>

											<view class="pkdy" v-if="fromList[2].isMvp == 2">
												3

											</view>

											<view class="pkdy" style="background: none;" v-if="fromList[2].isMvp == 1">
												<image style="width:50upx; height: auto; position: absolute;"
													src="https://webapp.test.shenghua6.cn/st/mini/static/img/xcxydy/mvpx.png"
													mode="widthFix"></image>

											</view>
										</view>

									</view>

									<view class="pkgztx" v-else>
										<view style="text-align: center; position:relative;  ">
											<image class="gztxlb" style="border:2upx solid #067EE7;"
												src="https://webapp.test.shenghua6.cn/st/mini/static/img/xcxydy/lanse.png">
											</image>

											<view class="pkdy">
												3

											</view>
										</view>
									</view>



									<view class="pkgztx" v-if="fromList.length>=2">
										<view style="text-align: center; position:relative;  ">

											<image v-if="fromList.length>=2" class="gztxlb"
												:src="$global.getImageUrl(fromList[1].headImg+'?x-oss-process=image/bright,15/resize,m_fill,h_80,w_80', 'https://ourydcimage.shenghua6.cn')"
												mode=""></image>

											<image v-else class="gztxlb" style="border:2upx solid #067EE7;"
												src="https://webapp.test.shenghua6.cn/st/mini/static/img/xcxydy/lanse.png">
											</image>

											<view class="pkdy" v-if="fromList[1].isMvp == 2">
												2

											</view>

											<view class="pkdy" style="background: none;" v-if="fromList[1].isMvp == 1">
												<image style="width:50upx; height: auto; position: absolute;"
													src="https://webapp.test.shenghua6.cn/st/mini/static/img/xcxydy/mvpx.png"
													mode="widthFix"></image>

											</view>
										</view>

									</view>

									<view class="pkgztx" v-else>
										<view style="text-align: center; position:relative;  ">
											<image class="gztxlb" style="border:2upx solid #067EE7;"
												src="https://webapp.test.shenghua6.cn/st/mini/static/img/xcxydy/lanse.png">
											</image>

											<view class="pkdy">
												2

											</view>
										</view>
									</view>



									<view class="pkgztx" v-if="fromList.length>=1">
										<view style="text-align: center; position:relative;  ">

											<image v-if="fromList.length>=1" class="gztxlb"
												:src="$global.getImageUrl(fromList[0].headImg+'?x-oss-process=image/bright,15/resize,m_fill,h_80,w_80', 'https://ourydcimage.shenghua6.cn')"
												mode=""></image>

											<image v-else class="gztxlb" style="border:2upx solid #067EE7;"
												src="https://webapp.test.shenghua6.cn/st/mini/static/img/xcxydy/lanse.png">
											</image>

											<view class="pkdy" v-if="fromList[0].isMvp == 2">
												1

											</view>

											<view class="pkdy" style="background: none;" v-if="fromList[0].isMvp == 1">
												<image style="width:50upx; height: auto;  position: absolute;"
													src="https://webapp.test.shenghua6.cn/st/mini/static/img/xcxydy/mvpx.png"
													mode="widthFix"></image>

											</view>
										</view>

									</view>

									<view class="pkgztx" v-else>
										<view style="text-align: center; position:relative;  ">
											<image class="gztxlb" style="border: 2upx solid #067EE7;"
												src="https://webapp.test.shenghua6.cn/st/mini/static/img/xcxydy/lanse.png">
											</image>

											<view class="pkdy">
												1

											</view>
										</view>
									</view>
								</view>
								<view class="pkligjauto">
								</view>
								<view class="pkllleft" @click="gongxianb(2)">
									<view class="pkgztx" v-for="(item,index) in toList">
										<view style="text-align: center; position:relative;  ">
											<!-- <image class="gztxlb" src="https://ourydcimage.shenghua6.cn/defaultHeadImage/11.jpg?x-oss-process=image/bright,15/resize,m_fill,h_110,w_110"  ></image> -->
											<image v-if="item.headImg" class="gztxlb"
												:src="$global.getImageUrl(item.headImg+'?x-oss-process=image/bright,15/resize,m_fill,h_80,w_80', 'https://ourydcimage.shenghua6.cn')"
												mode=""></image>



											<image v-else class="gztxlb" style=" border:2upx solid #F05E98;"
												src="https://webapp.test.shenghua6.cn/st/mini/static/img/xcxydy/hongse.png">
											</image>

											<view class="pkdys" v-if="item.isMvp == 2">
												{{index+1}}

											</view>

											<view class="pkdys" style="background: none;" v-else-if="item.isMvp == 1">
												<image style="width:50upx; height: auto; position: absolute;"
													src="https://webapp.test.shenghua6.cn/st/mini/static/img/xcxydy/mvpx.png"
													mode="widthFix"></image>

											</view>

											<view class="pkdys" v-else>
												{{index+1}}

											</view>
										</view>

									</view>

								</view>



							</view>



						</view>
					</view>








				</div>



				<view style="height:20upx;">

				</view>

				<view style="height: 150upx;" v-if="kqpk==true">

				</view>

				<view class="mai" @click="changeOnline" :style="'width:'+maixchadu+'rpx'" v-if="kqpk==false">
					<view class="slide-box">
						<!-- 麦下用户 -->
						<!-- style="display: inline-block;" -->
						<div class="slide-item" v-for="(people,index) in peopleData" :key="index">
							<image style="border-radius: 50%;" class="img"
								v-if="people.custom!=''&&people.custom!=undefined"
								:src="$global.getImageUrl(people.custom.headImg+'?x-oss-process=image/bright,15/resize,m_fill,h_80,w_80', 'https://ourydcimage.shenghua6.cn')"
								mode="">
							</image>
						</div>
					</view>
					<view class="right">
						<ul>
							<li>
								{{peopleDatalent}}
								<image style="width: 20upx;height: 24upx;margin-left: 8upx;"
									:src="$BASE_URL+'/st/mini/static/img/chatRoomDetails/maixia.png'" mode=""></image>
							</li>
							<li class="miDown">麦下</li>
						</ul>
					</view>
				</view>


			</div>
			<!--进入聊天室信息-->
			<div class="enterBox">
				<ul>
					<!-- <li><span class="dj"></span><span>情诗</span><span class="style1">进入聊天室</span></li> -->
				</ul>
			</div>
			<!--发送消息-->
			<!-- <view class="content flex-column messageBox">
				<view class="scroll-view flex-1">
					<scroll-view :scroll-y="true" :scroll-top="scrollTop" :style="{'height':scrollViewH}"
						scroll-with-animation="true">
						<ul>
							<li class="li" v-for="(item,index) in liaottianTxtData" :key="index" v-html="item"></li>
						</ul>
					</scroll-view>
				</view>
			</view> -->
			<view class="content flex-column">

				<view class="flex-1">
					<scroll-view :scroll-y="true" :scroll-top="scrollTop" style="height:600upx;"
						scroll-with-animation="true">
						<block v-for="(item,index) in liaottianTxtData" :key="index">
							<view class="item-view" v-html="item">

							</view>
						</block>
					</scroll-view>
				</view>
			</view>
			<!--风车-->
			<!-- 二维码弹窗 -->
			<u-popup v-model="shareShows" mode="center" :closeable='true'>
				<view class="share1">
					<view style="text-align: center; margin-bottom: 20upx">请关注“哩咔”公众号充值</view>
					<image id="imgTest" :src="$BASE_URL + '/st/mini/static/img/mine/qr_code.png'" style="
			    width: 432upx;
			    height: 490upx;
			    margin: 0 auto;
			    display: block;
			    margin-bottom: 20upx;
			  "></image>
					<view style="width: 514upx; margin: 0 auto; display: flex">
						<ul>
							<li class="li3">
								保存二维码扫描关注，或直接搜索公众号“哩咔”关注后可在公众号进行充值哦~
							</li>
						</ul>
					</view>
					<view class="btn" @click="downs($BASE_URL + '/st/mini/static/img/mine/qr_code.png')">保存二维码到相册</view>
				</view>
			</u-popup>




			<div class="footerFixed">



				<view class="liaotian">
					<!-- <button type="default" @click="gensui()"> gensui动画</button> -->
					<input type="text" value="" v-model="mesgtext" :focus="focusState" confirm-type="send"
						@confirm="sendMsg" placeholder="来聊天啊..." class="input" cursor-spacing="35"
						placeholder-style="color:#fff;" />
				</view>
				<view style="position: fixed;bottom:15upx;right: 0;z-index: 9;">
					<!-- 上麦按钮 -->
					<image @click="onSeatx()" class="img"
						:src="$BASE_URL+'/st/mini/static/img/chatRoomDetails/lianmai.png'" mode=""
						v-if="lianmai && zblb == 27">
					</image>
					<!-- 麦克风图标 -->
					<image v-if="!lianmai&&!maike" class="img" :src="$BASE_URL +'/st/mini/static/img/gender/kaiqis.png'"
						mode="widthFix" @click="maikes(1)"></image>
					<image v-if="!lianmai&&maike" class="img" :src="$BASE_URL +'/st/mini/static/img/gender/guanbis.png'"
						mode="widthFix" @click="maikes(2)"></image>

					<!-- 私聊 -->
					<image class="img" @click="zsliaotlb"
						src="https://webapp.test.shenghua6.cn/st/mini/static/img/xcxydy/silaito.png" mode="">
					</image>
					<block v-if="sllist.length>0">
						<view v-if="sllist[0].unread !=0"
							style="width:15upx;height:15upx; background: red; border-radius: 50%;position:absolute;right:115upx;bottom:60upx; ">
						</view>
					</block>
					<image @click="giftShowChange" class="img"
						:src="$BASE_URL + '/st/mini/static/img/chatRoomDetails/liwu.png'" mode=""></image>
				</view>
				<image style="position: fixed;bottom:15upx;height: 66upx;width: 100%;left: -40upx;"
					:src="$BASE_URL+'/st/mini/static/img/chatRoomDetails/download.png'" mode="" @click="downApp">
				</image>
			</div>
			<!--遮罩层 下载-->
			<!--私密厅弹框-->
			<div class="popupBox tingbo" v-if="privateRoom">
				<div class="pr h100">
					<div style="font-size: 35upx;">此聊天室为私密厅,无法直接播放</div>
				</div>
			</div>
			<template v-if="!privateRoom">
				<!--停播弹窗-->
				<div class="popupBox tingbo" v-if="liveOver">
					<div class="pr h100">
						<div style="font-size: 35upx;">{{message}}</div>
					</div>
				</div>
				<!--播放弹窗-->
			</template>


			<!--礼物-->
			<div id="bodymovin" style="display: none;">

			</div>


			<!--播放器——音频流-->
			<div class="bfqBox" preload="auto" style="text-align: center;">
				<div class="prism-player" id="J_prismPlayer" style="position: absolute"></div>
			</div>
			<!--		<template v-if="m3u8Url&&!ios">-->
			<!--			x5-video-player-type="h5" x5-video-player-fullscreen="true"-->
			<!--			<video id="myVideo" x5-video-player-type="h5" x5-video-player-fullscreen="true"  class="vjs-remaining-time-display" height="0" width="0" preload="none" data-setup='{}'  style="position: absolute;display: none !important;">-->
			<!--				<source id="source" :src="m3u8Url" type="application/x-mpegURL"></source>-->
			<!--			</video>-->
			<!--		</template>-->
			<template>
				<!-- <video :src="m3u8Url" controls autoplay></video> -->
				<!-- 	{{m3u8UrlData}}
				{{list.url}} -->
				<!-- {{yuyinzhiboliu}} -->
				<live-player style="width:0upx; height: 0upx; " :src="list.url" @statechange="statechange" mode="RTC"
					autoplay v-for="(list,index) in m3u8UrlData" :key="index" />
				<!-- <audio :src="m3u8Url" autoplay></audio> -->
				<!-- <audio id="myVideo" class="vjs-remaining-time-display video-js" x-webkit-airplay="true"
					x5-video-player-fullscreen="true" preload="auto" playsinline="true" webkit-playsinline
					x5-video-player-type="h5" height="0" width="0" preload="auto" data-setup='{}'
					style="position: absolute;opacity: 0">
					<source :src="m3u8Url" type="application/x-mpegURL" />
				</audio> -->
			</template>
			<audio id="myAudio" autoplay :src="audioUrl" type="application/x-mpegURL">
			</audio>
		</div>
		<view @click="shareshow" style="position: fixed;right: 20upx;bottom: 450upx;">
			<image :src="$BASE_URL+'/st/mini/static/img/chatRoomDetails/share.png'" style="width: 84upx;height: 110upx;"
				mode=""></image>
			<view style="color: #FFFFFF;font-size: 18upx;text-align: center;margin-top: -35upx;">分享</view>
		</view>


		<!-- 聊天图标 -->

		<!-- sllist.unread -->
		<!-- 
		<view @click="zsliaotlb" style="position: fixed;right: 20upx;bottom: 200upx;">

			<view v-if="sllist.length>0">

 @click="zsliaotlb"

				<view v-if="sllist[0].unread !=0"
					style="width: 15upx; height: 15upx; background: red; border-radius: 50%;position: fixed;right: 25upx; ">

				</view>
			</view>

			<image src="https://php.zgsj1.com/upload_video/20211119/1700e620d4e07c85a0d1db95708000fb.png"
				style="width: 84upx;height: auto;" mode="widthFix"></image>
	
		</view> -->




		<!-- 分享 -->
		<u-popup v-model="shareShow" mode="center" border-radius="30">
			<view style="position: relative;" class="sharePop">
				<image class="shareImg" :src="$BASE_URL+'/st/mini/static/img/chatRoomDetails/fenxiang.png'"></image>
				<view style="position: absolute;top: 40upx;right: 40upx;width: 60upx;height: 60upx;"
					@click="shareShow=false"></view>
				<view class="shareList">
					<button class="fx" data-name="shareBtn" hover-class="btn-hover" open-type="share"
						style="width: 50%;">
						<ul>
							<li>
								<image :src="$BASE_URL+'/st/mini/static/img/chatRoomDetails/weixin.png'"
									class="shareIcon"></image>
							</li>
							<li>发送给朋友</li>
						</ul>
					</button>
					<button hover-class="btn-hover" style="width: 50%;" @click="changeShare">
						<ul>
							<li>
								<image :src="$BASE_URL+'/st/mini/static/img/chatRoomDetails/baocun.png'"
									class="shareIcon"></image>
							</li>
							<li>下载分享图</li>
						</ul>
					</button>
				</view>
			</view>
		</u-popup>

		<!-- 分享海报 -->
		<u-popup v-model="shareShow1" mode="center" v-if="ssssss">



			<lpainter :board="base" @success="onsuccess" :isRenderImage="true" />




			<view style="height:30rpx;">
			</view>

			<view class="btntt" @click="saveImage" style="margin: auto;
     left: 0;
     right: 0;">保存小程序码到相册
			</view>


		</u-popup>
		<!-- 打赏 -->
		<u-popup v-model="downShow" mode="bottom" style="margin: 0 20upx;background-color: none;">
			<ul class="dashang">
				<view style="border-radius: 20upx;background-color: #FFFFFF;">
					<li @click="sendMine">打赏给自己</li>
					<li style="border-top: 1px solid #EEEEEE;" @click="offSeat">我要下麦</li>
				</view>
				<li class="li3" @click="downShow=false">取消</li>
			</ul>
		</u-popup>
		<!-- 玩法介绍 -->
		<u-popup v-model="wanShow" mode="center">
			<view style="position: relative;">
				<image class="wanImg" :src="$BASE_URL+'/st/mini/static/img/chatRoomDetails/wanfajieshao.png'" mode="">
				</image>
				<view class="wanTxt" v-html="roomIntroduce"></view>

				<view style="position: absolute;top: 40upx;right: 40upx;width: 60upx;height: 60upx;"
					@click="wanShow=false"></view>
			</view>
		</u-popup>
		<!-- 在线列表 -->
		<u-popup v-model="onlineShow" mode="bottom">
			<view>
				<view style="position: relative;">
					<image class="onlineImg" :src="$BASE_URL+'/st/mini/static/img/chatRoomDetails/online.png'"
						mode="widthFix"></image>
					<view
						style="font-size: 34upx;color: #181821;position: absolute;top: 23%;left: 50%;transform: translateX(-50%);">
						在线列表</view>
				</view>
				<view style="background: #2f2c46;height: 600upx;margin-top: -65upx;">
					<view class="onlineListAll">
						<scroll-view :scroll-y="true" style="height:550upx;" scroll-with-animation="true"
							refresher-enabled="true" :refresher-triggered="triggered" :refresher-threshold="40"
							refresher-background="#2F2C46" @refresherpulling="onPulling" @refresherrefresh="onRefresh"
							@refresherrestore="onRestore" @refresherabort="onAbort">
							<view class="onlineList" v-for="(people,index) in zxlib" :key="index">



								<image class="head"
									:src="$global.getImageUrl(people.custom.headImg+'?x-oss-process=image/bright,15/resize,m_fill,h_100,w_100', 'https://ourydcimage.shenghua6.cn')"
									mode=""></image>
								<ul>

									<li class="li1">{{people.nick}}</li>
									<view style="height: 10upx;">
									</view>


									<p class="sex"
										:style="people.custom.gender==1?'background: url('+man+') no-repeat;background-size: contain;':people.custom.gender==2?'background: url('+woman+') no-repeat;background-size: contain;':'background: url('+no+') no-repeat;background-size: contain;'">
										<view style="margin-left:15upx;font-size: 22upx;">
											{{people.custom.age}}
										</view>
									</p>
									<li>
									</li>
								</ul>
							</view>
						</scroll-view>
					</view>
				</view>
			</view>
		</u-popup>


		<!-- 礼物列表 -->
		<u-popup v-model="giftShow" mode="bottom" @close="close">
			<!--  -->
			<view class="gift" v-if="giftShow" @click.stop="giftNumChanges()">

				<view class="peolist" v-if="!giftShow1">

					<scroll-view scroll-x="true" class="scroll">

						<div class="slide-item1" v-for="(chat,index) in maix" :key="index"
							v-if="chat.headImg!=undefined" @click="getSelectArea(chat.seat)">
							<image class="img" :class="{peoactive:chat.tye}"
								:src="$global.getImageUrl(chat.headImg+'?x-oss-process=image/bright,15/resize,m_fill,h_150,w_150', 'https://ourydcimage.shenghua6.cn')"
								mode="">
							</image>

							<view class="txt" :class="{peoactive1:chat.tye}">
								{{chat.seat==0?'房主':chat.seat}}
							</view>
						</div>
					</scroll-view>


					<view style=" font-size:18upx; display: flex; align-items: center;height: 100upx; ">

						<view class="ansi" v-if="ziliao" @click="grzl()">
							资料
						</view>
						<view style="width:5%;"></view>
						<view class="ansi" :style="quanmai?'background:#F0AD4E;  ':'background:none;'"
							@click="allchange">
							全麦
						</view>
						<!-- <view style="width:5%;"></view> -->

					</view>

					<view style="width:1.5%;">

					</view>

					<!-- 	<view style="display: flex;border:1upx solid #fff;align-items: center;height:60upx;">
						<view class="btn" :style="quanmai?'background:#F0AD4E;  ':'background:none;'" @click="allchange">
							全麦
						</view>
						<view class="btn" :style="quanmai?'background:#F0AD4E;':'background:none;'" @click="allchange">
							全麦
						</view>
					</view> -->
				</view>
				<!-- 	取 所有麦上用户信息 到一个数组，
	<!-- 房主放到第一个 -->
				<!-- 选礼物时候，选中状态不可为空 -->
				<!-- 点击麦上 非自己用户 调出 礼物列表  选中状态 - ->
	 <!-- 点击麦上自己头像 可选择 送礼物给自己，的选中状态 -->

				<view class="giftlist">
					<view class="tab">
						<text v-for="(tab,index) in tabData" :key="index" style="margin-right: 43upx;"
							:class="{active:index==isIndex}" @click="changeTab(index)">{{tab}}</text>
					</view>
					<swiper class="swiper" :current="current" :circular="circular" style="height: 430upx;"
						:indicator-dots="true" @change="swiperChange" indicator-color="rgba(255, 255, 255,0.6)"
						indicator-active-color="rgba(255, 255, 255,1)" v-if="giftData.length>0">
						<!-- style="display: flex;justify-content: space-evenly;box-sizing: border-box;display: flex;flex-wrap: wrap;" -->
						<swiper-item v-for="(item,index) in giftData" :key="index">
							<view :class="isIndex1==index1?'active1 swiper-item':'swiper-item'"
								style="width:23%;float:left;margin-left:1%;" v-for="(list,index1) in item" :key="index1"
								@click="changeGift(index1,list.id||list.amId,list.animationUrl)">
								<view
									style="width: 100%;height: 60%;display: flex;align-items: center;justify-content: center;">

									<image style="width:105upx;display: block;height: auto;"
										:src="$global.getImageUrl(list.image,'https://ourydcimage.shenghua6.cn')"
										mode="widthFix"></image>
								</view>
								<view :class="isIndex1==index1?'active2 title':'title'">
									<view style="font-size: 22upx;text-align: center;">
										{{list.name==undefined?list.propName:list.name}}
									</view>
									<view style="font-size: 18upx;text-align: center;">
										{{list.price}}{{isIndex==0?'钻石':isIndex==1?'金币':list.unitName+'x'+list.propNum}}
									</view>
								</view>
							</view>
						</swiper-item>
					</swiper>
					<view class="shengtu" style="z-index: 9999;height: 430upx;" v-else>
						<view style="text-align: center;">
							<text>背包还什么都没有啊</text>
							<view></view>
							<text> 快把我填满吧~ </text>
						</view>
					</view>
					<view>
						<!-- @click="giftNumChanges" -->
						<view
							style="display: flex;align-items: center;padding-left: 39upx;padding-right: 12upx;background: #121219;height: 90upx;">
							<text v-if="isIndex==0" style=" width: 200upx; font-size: 24upx;">钻石：{{diamond}}</text>
							<text v-if="isIndex==1" style=" width:200upx;  font-size: 24upx;">金币：{{score}}</text>
							<text v-if="isIndex==2" style=" width:200upx;  font-size: 24upx;"> </text>
							<image style="width: 90upx;height:auto;margin-left: 28upx;"
								:src="$BASE_URL+'/st/mini/static/img/chatRoomDetails/chongzhi.png'" @click="czPop"
								v-if="isIndex==0" mode="widthFix">
							</image>
							<image style="width: 120upx;height:auto;margin-left: 28upx;"
								:src="$BASE_URL+'/st/mini/static/img/chatRoomDetails/huoqujinbi.png'" @click="czPop(1)"
								v-if="isIndex==1" mode="widthFix">
							</image>
							<view class="giftnum" style="margin-left: auto;position: relative;">
								<view
									style="border: 1upx solid #979797;border-radius: 8upx;font-size: 16upx;color: #FFFFFF;padding: 8upx;"
									@click.stop="giftNumChange">数量X
									<text style="font-size: 24upx;color: #DC446B;">{{num}}</text>
								</view>
								<view v-show="giftNumShow"
									style="position: absolute;top: -420upx;right:-60upx;width: 214upx;height: 407upx;padding-top: 9upx;"
									:style="'background: url('+bgUrl+') no-repeat;background-size: contain;'">
									<ul>
										<li v-for="(item,index) in giftNumData" :key="index"
											@click='giftChange(index,item.num)' :class="{active:index==giftIndex}">
											<text style="color: #DC446B;">{{item.num}}</text><text
												style="width: 125upx;display: inline-block;">{{item.name}}</text>
										</li>
									</ul>
									<view style="width: 100%;height: 40upx;" @click="upNum"></view>
								</view>
							</view>
							<!-- {{isIndex1}} -->
							<image v-if="zengsong && isIndex1>=0" style="width: 215upx;height: 62upx;margin-left: auto;"
								:src="$BASE_URL+'/st/mini/static/img/chatRoomDetails/zengsong.png'"
								@click="sendMoreGift"></image>
							<image v-else style="width:215upx;height: 62upx;margin-left: auto;"
								:src="$BASE_URL+'/st/mini/static/img/chatRoomDetails/zengsonghui.png'" @click="huise">
							</image>
						</view>
					</view>
				</view>
			</view>
		</u-popup>
		<!-- 加载中
		 -->
		<!-- 礼物数量输入弹窗 -->
		<u-popup v-model="numShow" mode="bottom">
			<view
				style="background: #121219;border: 1upx solid #F4DC92;display: flex;border-radius: 15upx;padding: 8upx;">
				<input type="number" v-model="num1" value="" placeholder="请输入礼物数量，最多99999"
					style="flex: 1;color: #fff;font-size: 24upx;height: 62upx;display: inline-block;" />
				<image style="width: 215upx;height: 62upx;margin-left: auto;"
					:src="$BASE_URL+'/st/mini/static/img/chatRoomDetails/queding.png'" @click="sendMoreGift(1)">
				</image>
			</view>
		</u-popup>

		<!-- 个人资料背景 -->
		<!-- https://php.zgsj1.com/upload_video/20211101/1f2e824284123a38376584942f72798d.png -->
		<!-- 导航定位图标 -->
		<!-- https://php.zgsj1.com/upload_video/20211101/788cb5024820ebfbfa6655a8ab3f430f.png -->
		<!-- 本周礼物 -->
		<!-- https://php.zgsj1.com/upload_video/20211101/ab93fbc8c1b909ad0944268154445630.png -->
		<!-- 按钮底色 -->
		<!-- https://php.zgsj1.com/upload_video/20211101/32acfa4ae07788a8327316366c91b076.png -->
		<!-- 关注 -->
		<!-- https://php.zgsj1.com/upload_video/20211101/48ee1356c63653b664e190b1d8a45bfb.png -->
		<!-- @AT -->
		<!-- https://php.zgsj1.com/upload_video/20211101/d181193c3a9e933d61435b1341e25c30.png -->
		<!-- 聊天 -->
		<!-- https://php.zgsj1.com/upload_video/20211101/706e4b8f31dd39ac9f206b00c91bb5c8.png -->
		<!-- 打赏 -->
		<!-- https://php.zgsj1.com/upload_video/20211101/c937d11208f2893513af18717240f916.png -->
		<!-- 已关注 -->
		<!-- https://php.zgsj1.com/upload_video/20211101/a8b987c6c199a6a0900cc6637e2fff2f.png -->

		<!-- 背景1 -->
		<!-- https://php.zgsj1.com/upload_video/20211101/29e5856e0096c88aec446b9ab47bfe8b.png -->

		<!-- 背景2 -->
		<!-- https://php.zgsj1.com/upload_video/20211101/23fb8cf3e76b2ddf7771a2a13cc9d8b7.png -->

		<!-- 背景3 -->
		<!-- https://php.zgsj1.com/upload_video/20211101/5ed4af107331fe64e3a6008da7396942.png -->

		<!-- 背景4 -->
		<!-- https://php.zgsj1.com/upload_video/20211101/fd413bbc4ff5e52ad7bc724c8709422c.png -->


		<!-- 私聊的返回按钮 -->
		<!-- https://php.zgsj1.com/upload_video/20211119/4285e1c9d96368b4a3bb265a340d822e.png -->

		<!-- 私信图标 -->
		<!-- https://php.zgsj1.com/upload_video/20211119/1700e620d4e07c85a0d1db95708000fb.png -->




		<u-popup v-model="gerenzl" mode="bottom" border-radius="14">


			<!-- 个人资料 -->
			<view style="height: 80upx;">

			</view>

			<view class="gerenziliaobj">

				<view style="margin:0 auto;text-align: center;">

					<!-- 		<image
						style="width: 150upx;border-radius: 50%;border: 1px solid #000000;height:atuo;margin-top: -65upx;"
						src="../../../static/img/tab/babs4.png" mode="widthFix"></image> -->

					<image
						style="width:140upx; height:auto;border-radius: 50%;margin-top: -65upx; border:2upx solid #FFFFFF; "
						:src="$global.getImageUrl(gerezilial.headImg+'?x-oss-process=image/bright,15/resize,m_fill,h_110,w_110', 'https://ourydcimage.shenghua6.cn')"
						mode="widthFix">
					</image>


				</view>


				<view style="display: flex;width: 95%;margin: 0 auto;">
					<view style="width: 70%;">
						<view class="grzlname">
							{{gerezilial.nickName}}



							<p class="sexs"
								:style="gerezilial.sex==1?'background: url('+man+') no-repeat;background-size: contain;':gerezilial.sex==2?'background: url('+woman+') no-repeat;background-size: contain;':'background: url('+no+') no-repeat;background-size: contain;'">
								<view style="margin-left:15upx;font-size: 22upx;">
									{{gerezilial.age}}
								</view>
							</p>




						</view>


						<view style="height:6upx;"></view>
						<view class="grid">
							ID :{{gerezilial.identityId}}
							<image src="https://webapp.test.shenghua6.cn/st/mini/static/img/xcxydy/dingweis.png"
								style="width:20upx;height: auto;margin-left:18upx;" mode="widthFix"></image>
							<text class="trqg" style="margin-left:5upx;">
								{{gerezilial.city}}
							</text>
						</view>
						<view style="height:6upx;"></view>
					</view>
					<view
						style="width:30%; display: flex;  flex-flow: column;    align-items: center; justify-content: center;"
						@click="tiss">
						<view style="display: flex; align-items: center; justify-content: center;">
							<!-- src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fwx4.sinaimg.cn%2Fmw690%2F0066Nb6jly1gupg99fia7j60u014dgw602.jpg&refer=http%3A%2F%2Fwx4.sinaimg.cn&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1638349573&t=ea666259fbcfb18f0ede5e99699e41cd" -->
							<image v-for="(item,index) in gerezilial.top3PhotoWall"
								:class="[{'tu0':index == 0},{'tu1':index == 1},{'tu2':index == 2}]"
								:src="$global.getImageUrl(item, 'https://ourydcimage.shenghua6.cn')" mode=""
								v-if="index<3"></image>
							<!-- 	<image class="tu1" src="https://lupic.cdn.bcebos.com/20210629/2000014899_14.jpg" mode="">
							</image>
							<image class="tu2"
								src="https://nimg.ws.126.net/?url=http%3A%2F%2Fdingyue.ws.126.net%2F2021%2F1101%2Feee2608dj00r1vgno0012c000cy009vm.jpg&thumbnail=650x2147483647&quality=80&type=jpg"
								mode=""></image> -->
						</view>


						<text v-if="dianguan" style="font-size: 40upx;margin-top: -20upx;">

							...


						</text>
					</view>
				</view>

				<!-- <view style="height:16upx;"></view> -->
				<view class="grqms" @click="tisss">
					{{gerezilial.descr}}
				</view>
				<view style="height:16upx;"></view>
				<!-- 本周个人礼物 -->
				<view class="grbzlwu" @click="tisss">
					<view
						style=" display: flex; flex-flow: column; align-items: center; justify-content: center;  width:28%;height:90upx; font-family: PingFangSC-Medium;">

						<view style="font-size:38upx;color: #FFFFFF;">
							<text>{{zongshul}}
							</text> <text style="color: #FFFFFF;margin-left:10upx;">个</text>
						</view>

						<view style="font-family: PingFangSC-Medium;font-size:18upx;color: #DFCEFA;margin-left: 10upx;">
							本周收到礼物
						</view>

					</view>
					<view style="width:63%;height:90upx;display: flex;align-items: center;justify-content: center;">


						<scroll-view class="scroll-view_H" scroll-x="true" @scroll="handleScroll" scroll-left="1">

							<image v-for="(item,index) in  gerezilial.thisWeekGiftList"
								style="width:100upx; margin-top:15upx;"
								:src="$global.getImageUrl(item.image, 'https://ourydcimage.shenghua6.cn')" mode="widthFix">
							</image>

							<!-- <image style="width:80upx; height: auto;margin:0 auto;"
										:src="$global.getImageUrl(item.image, 'https://ourydcimage.shenghua6.cn')"
										mode="widthFix">
									</image> -->
							<!-- 	<view style=" display: flex; align-items: center; height:100upx;  ">
								<view class="scroll-view-item_H " v-for="(item,index) in 5"
									style=" height:100upx;   text-align: center;">
									12
									<image style="width:80upx; height: auto;margin:0 auto;"
										src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fwx4.sinaimg.cn%2Fmw690%2F0066Nb6jly1gupg99fia7j60u014dgw602.jpg&refer=http%3A%2F%2Fwx4.sinaimg.cn&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1638349573&t=ea666259fbcfb18f0ede5e99699e41cd"
										mode="widthFix"></image>
									<image style="width:110upx; height: auto;margin:0 auto;"
										:src="$global.getImageUrl(item.image, 'https://ourydcimage.shenghua6.cn')"
										mode="widthFix">
									</image>
								</view>
							</view> -->

						</scroll-view>


					</view>


				</view>

				<!-- 判断是否是pk状态下打开的个人资料窗口 -->
				<view class="grbottom" v-if="pklist.status==4 ||pklist.status==5">
					<!-- 	<view class="botnegr" v-if="uuuid !=gerezilial.userId">
						<image style="width:65upx;height:auto;"
							src="https://php.zgsj1.com/upload_video/20211101/d181193c3a9e933d61435b1341e25c30.png"
							mode="widthFix" @click="graiteta"></image>
					</view> -->
					<view class="botnegr" v-if="uuuid !=gerezilial.userId">
						<image v-if="gerezilial.isAttention ==2  " style="width:75upx;height:auto;"
							src="https://webapp.test.shenghua6.cn/st/mini/static/img/xcxydy/guanzhus.png" mode="widthFix"
							@click="grguanzhu"></image>

						<image v-else @click="gryiguanzhu" style="width:90upx;height:auto;"
							src="https://webapp.test.shenghua6.cn/st/mini/static/img/xcxydy/yiguanzhus.png"
							mode="widthFix"></image>
					</view>
					<view class="botnegr" v-if="uuuid !=gerezilial.userId" @click="grliaotian">
						<image style="width:80upx;height:auto;"
							src="https://webapp.test.shenghua6.cn/st/mini/static/img/xcxydy/laitoaks.png" mode="widthFix">
						</image>
					</view>
					<!-- 	<view class="botnegr">
						<image style="width:80upx;height:auto;"
							src="https://php.zgsj1.com/upload_video/20211101/c937d11208f2893513af18717240f916.png"
							mode="widthFix" @click="grdashang"></image>
					</view> -->
				</view>



				<view class="grbottom" v-else>
					<view class="botnegr" v-if="uuuid !=gerezilial.userId">
						<image style="width:65upx;height:auto;"
							src="https://webapp.test.shenghua6.cn/st/mini/static/img/xcxydy/aite.png" mode="widthFix"
							@click="graiteta"></image>
					</view>
					<view class="botnegr" v-if="uuuid !=gerezilial.userId">
						<image v-if="gerezilial.isAttention ==2  " style="width:75upx;height:auto;"
							src="https://webapp.test.shenghua6.cn/st/mini/static/img/xcxydy/guanzhus.png" mode="widthFix"
							@click="grguanzhu"></image>

						<image v-else @click="gryiguanzhu" style="width:90upx;height:auto;"
							src="https://webapp.test.shenghua6.cn/st/mini/static/img/xcxydy/yiguanzhus.png"
							mode="widthFix"></image>
					</view>
					<view class="botnegr" v-if="uuuid !=gerezilial.userId">
						<image style="width:80upx;height:auto;"
							src="https://webapp.test.shenghua6.cn/st/mini/static/img/xcxydy/laitoaks.png" mode="widthFix"
							@click="grliaotian"></image>
					</view>
					<view class="botnegr">
						<image style="width:80upx;height:auto;"
							src="https://webapp.test.shenghua6.cn/st/mini/static/img/xcxydy/dasalk.png" mode="widthFix"
							@click="grdashang"></image>
					</view>
				</view>

			</view>
		</u-popup>
		<!-- 礼物特效 -->
		<canvas id="demoCanvas" type="2d"
			:style="'width:160%;position:absolute;top:0;left:-30%; bottom:0; height:'+ Height +'rpx'"></canvas>
		<live-pusher :url="pushurl" mode="RTC" autopush bindstatechange="statechange1" style="width: 0; height: 0;" />


		<!-- pk规则 -->
		<u-popup v-model="pkguize" mode="bottom" :closeable='true'>

			<view style="height:350upx;background: #FFFFFF;border-radius: 28upx 28upx 0  0;  ">
				<view class='pkgz'>
					<view style="height:20upx;"></view>
					PK规则
				</view>
				<view style="height:20upx;"></view>

				<view style="width: 90%; margin: 0 auto; color: #666; font-size:26upx; ">
					<view class="">
						1、开启PK后双方进入PK阶段，PK时间为5分钟
					</view>

					<view class="">
						2、PK时间结束时，由PK值高的一方获胜，获胜/失败后进入3分钟惩罚阶段；若PK值相同时则视为平局不进入惩罚阶段并结束此轮PK</view>
					<view class="">
						3、PK进行时礼物弹窗内守护礼物不计算在PK值内

					</view>
				</view>


			</view>


		</u-popup>






		<u-popup v-model="siliao" mode="bottom">
			<view class="sllb"
				style="height:750upx;background: #FFFFFF;border-radius: 28upx 28upx 0  0; z-index: 99999; ">
				<view class='pkgz'>
					<view style="height:40upx;"></view>
					私信
				</view>
				<scroll-view class="content-container" :scroll-y="true">
					<view class="topbox" v-for="(item,idx) in  sllist" @click="dakaisiliaoye(item.to)">
						<image class="touxiang" :src="item.img" mode="widthFix">
						</image>
						<view style="width:20upx;">
						</view>
						<view class="">
							<view class="name">
								{{item.name||'系统消息'}}
							</view>
							<view style="height:10upx;">

							</view>
							<view class="text">
								{{item.text || '收到消息,请打开哩咔APP查看' }}
							</view>
						</view>
						<view class="titme">

							{{getDateDiff(item.time)}}
						</view>
						<view style="height: 100upx;">

							<!-- {{item.unread}} -->
							<view class="yuandian" v-if="item.unread !=0">
							</view>
						</view>
					</view>


					<!-- 判断消息是否为空 -->
					<view class="iynst" v-if="sllist.length==0 ">
						<view style="width:50%;text-align: center; ">
							<view style="height: 100upx;"></view>
							<image style="width: 100%;height: auto;"
								:src="$BASE_URL +'/st/mini/static/img/gender/ques.png'" mode="widthFix">
							</image>
							<view class="texhe">
								怎么能没有消息呢~
							</view>
							<view style="height:10rpx;">
							</view>
							<view>
								快去找人聊聊吧~
							</view>
							<view style="height:120upx;">
							</view>
						</view>
					</view>
				</scroll-view>
			</view>
		</u-popup>

		<!-- :style="'position: fixed; bottom:'+ Heights +'upx'" -->

		<u-popup v-model="liaotianye" mode="bottom">

			<view style="height:750upx;"></view>

			<view class="siliaoss"
				:style="'z-index:999;overflow-y: hidden;overflow-x:hidden; width:100%; position:fixed;  bottom:'+ Heights +'px;!important;'">

				<view class='pkgz' style=" display: flex;line-height:70upx; align-items: center; ">
					<view style="width: 3%;">
					</view>
					<image @click="siliaofanh" src="https://webapp.test.shenghua6.cn/st/mini/static/img/xcxydy/fanhui.png"
						mode="widthFix" style="width:40upx; height: auto;"></image>
					<view style="width: 80%; text-align: center; ">
						{{titless}}
					</view>
				</view>

				<scroll-view :scroll-y="true" :scroll-top="scrollTops" style=" background:#f1f1f1;  height:550upx;">
					<view style="height: 20upx;">

					</view>
					<view class="" v-for="(item,index) in ltlist">
						<view class="shijianb" v-if="jiexishijian(index,item.time) !=0">
							<text class="shijian">{{jiexishijian(index,item.time)}}</text>
						</view>

						<view class="nei" v-if="item.flow=='in'">
							<image @click="tzgez(item.from)" class="tx" :src="headImg" mode="widthFix"></image>
							<text class="left-triangle"></text>
							<!-- 文字图片 -->
							<rich-text v-if="item.type=='text'" class='record-chatting-item-text'
								:nodes="generateRichTextNode(item.text)"></rich-text>
							<image style="width: 500upx;height: auto;" class='record-chatting-item-text'
								v-if="item.type=='image'" :src="item.file.url" @click="djyltp(item.file.url)"
								mode="widthFix">
							</image>
							<view v-if="item.type == 'audio'" class="audio-wrapper" style="background: #FFFFFF;"
								@click="bofyuy(item.file.mp3Url)">
								<image src="../../../static/img/tab/bofang.png" mode="widthFix" class="bofdj">
								</image>
								<text class="text"></text>
							</view>
						</view>
						<!-- 'text' (文本消息)
					'image' (图片消息)
					'audio' (音频消息)
					'video' (视频消息) -->
						<view class="nei self" v-if="item.flow=='out'">
							<!-- 语音 -->
							<view v-if="item.type == 'audio'" class="audio-wrapper" @click="bofyuy(item.file.mp3Url)">
								<text class="text"></text>
								<image src="../../../static/img/tab/bofang.png" mode="widthFix"
									style="width:60upx;height: auto;">
								</image>
							</view>

							<rich-text v-if="item.type=='text'" class='record-chatting-item-text bg'
								:nodes="generateRichTextNode(item.text)"></rich-text>
							<image style="width: 500upx;height: auto;" class='record-chatting-item-text bg'
								v-if="item.type=='image'" :src="item.file.url" @click="djyltp(item.file.url)"
								mode="widthFix">
							</image>
							<text class="right-triangle"></text>

							<!-- {{iheadImg}} -->
							<image @click="tzgez(item.from)" class="tx" :src="iheadImg" mode="widthFix"></image>
							<view style="width:40upx;">
							</view>
						</view>

					</view>






					<view style="height: 200upx;">

					</view>
				</scroll-view>
				<view class="bottom">
					<view style="width:3%;">
					</view>
					<view class="chatinput-content">
						<input @input="inputt" class="input" type="text" placeholder="打招呼会有意想不到的收获哦~" v-model="nero"
							cursor-spacing="35" :auto-height="true" :show-confirm-bar="false" :adjust-position="false"
							@blur="leaveInput" @focus="getHeight" value="" />
						<!-- <image class="bqico"
						src="https://php.zgsj1.com/upload_video/20211109/8c03788a350b590b127b9e701e0ff910.png"
						mode="widthFix" @click="biaoqings"></image> -->
						<view style="width:2%;">
						</view>
					</view>
					<!-- 	<image @click="fasongrup()" style="width: 70upx;"
					src="https://php.zgsj1.com/upload_video/20211109/3ae322a7ce6f3eb849503cdbad4f4e60.png"
					mode="widthFix">
				</image> -->
					<view :class="bottomstyle?'annius':'anniu'" @click="fasong()">
						发送
					</view>
					<view style="width:3%;">
					</view>
				</view>
			</view>
		</u-popup>












		<!-- 贡献榜 -->
		<u-popup v-model="gongxianbang" mode="bottom">
			<view class="gongxianbs">
				<view style="height: 20upx;"></view>
				<view class="lbulkjk">
					<view class="pxgxt" :style="currentTabs==1?'opacity:0.4;':''">
						<!-- opacity:0.4; -->
						<image style="width:170upx;height:auto; "
							src="https://webapp.test.shenghua6.cn/st/mini/static/img/xcxydy/wofanggongxianba.png"
							mode="widthFix" @click="gxbb(1)"></image>
					</view>
					<view class="pxgxt" :style="currentTabs==0?'opacity:0.4;':''">
						<image style="width:170upx;height:auto;"
							src="https://webapp.test.shenghua6.cn/st/mini/static/img/xcxydy/duifanggxb.png" mode="widthFix"
							@click="gxbb(2)"></image>
					</view>
				</view>


				<swiper :current="currentTabs" @change="swiperChanges" style="height: 730upx; overflow:auto">
					<swiper-item>
						<scroll-view scroll-y="true" style="height:730upx;">
							<view class="gxbqs">
								<view class="gxitem" style="position: relative;">
									<view style="height: 15upx;"></view>
									<image style="width: 50upx; height: auto;position: absolute;z-index: 99;"
										src="https://webapp.test.shenghua6.cn/st/mini/static/img/xcxydy/zdk.png"
										mode="widthFix"></image>
									<!-- {{gxblists}} -->
									<view class="gxqq">
										<image v-if="gxblists.length>=2"
											style="width:120upx;height: 120upx; border-radius: 50%;"
											:src="$global.getImageUrl(gxblists[1].headImg+'?x-oss-process=image/bright,15/resize,m_fill,h_150,w_150', 'https://ourydcimage.shenghua6.cn')"
											mode="" @click="grenziluty(gxblists[1].userId)"></image>

										<image v-else style="width:120upx;height: 120upx; border-radius: 50%;"
											src="https://ourydcimage.shenghua6.cn/2017/01/02/2017010200514854100.png"
											mode="">
										</image>
									</view>
									<view class="pkbdname">
										<text v-if="gxblists.length>=2"> {{gxblists[1].nickName}} </text>
										<text v-else>虚位以待</text>
									</view>
									<view class="pkzhi">
										<text v-if="gxblists.length>=2"> {{gxblists[1].contributionValue}}pk值 </text>
									</view>
								</view>
								<view class="gxitem" style="position:relative;">
									<image style="width:55upx; height: auto;position: absolute;z-index: 99;top: -8upx;"
										src="https://webapp.test.shenghua6.cn/st/mini/static/img/xcxydy/zdk.png"
										mode="widthFix"></image>
									<view class="gxqq">
										<image v-if="gxblists.length>=1"
											style="width:120upx;height: 120upx; border-radius: 50%;"
											:src="$global.getImageUrl(gxblists[0].headImg+'?x-oss-process=image/bright,15/resize,m_fill,h_150,w_150', 'https://ourydcimage.shenghua6.cn')"
											mode="" @click="grenziluty(gxblists[0].userId)"></image>

										<image v-else style="width:120upx;height: 120upx; border-radius: 50%;"
											src="https://ourydcimage.shenghua6.cn/2017/01/02/2017010200514854100.png"
											mode="">
										</image>
									</view>
									<view class="pkbdname">
										<text v-if="gxblists.length>=1"> {{gxblists[0].nickName}} </text>
										<text v-else>虚位以待</text>
									</view>
									<view class="pkzhi">
										<text v-if="gxblists.length>=1"> {{gxblists[0].contributionValue}}pk值 </text>
									</view>
								</view>


								<view class="gxitem" style="position: relative;">
									<view style="height: 15upx;"></view>
									<image style="width: 50upx; height: auto;position: absolute;z-index: 99;"
										src="https://webapp.test.shenghua6.cn/st/mini/static/img/xcxydy/zfs.png"
										mode="widthFix"></image>
									<view class="gxqq">
										<image v-if="gxblists.length>=3"
											style="width:120upx;height: 120upx; border-radius: 50%;"
											:src="$global.getImageUrl(gxblists[2].headImg+'?x-oss-process=image/bright,15/resize,m_fill,h_150,w_150', 'https://ourydcimage.shenghua6.cn')"
											mode="" @click="grenziluty(gxblists[2].userId)"></image>
										<image v-else style="width:120upx;height: 120upx; border-radius: 50%;"
											src="https://ourydcimage.shenghua6.cn/2017/01/02/2017010200514854100.png"
											mode="">
										</image>
									</view>
									<view class="pkbdname">
										<text v-if="gxblists.length>=3"> {{gxblists[2].nickName}} </text>
										<text v-else>虚位以待</text>
									</view>
									<view class="pkzhi">
										<text v-if="gxblists.length>=3"> {{gxblists[2].contributionValue}}pk值 </text>
									</view>
								</view>
							</view>
							<view class="gxblist" v-for="(item,index) in gxblists" v-if="index>2">
								<view style="width:80upx;text-align: center;">
									{{index+1}}
								</view>
								<image style="width:90upx;height: 90upx; border-radius: 50%;"
									:src="$global.getImageUrl(item.headImg+'?x-oss-process=image/bright,15/resize,m_fill,h_150,w_150', 'https://ourydcimage.shenghua6.cn')"
									mode="" @click="grenziluty(item.userId)"></image>
								<view style="width:30upx;"></view>
								<view
									style="font-family: PingFang-SC-Regular;font-size: 22upx;color: #FFFFFF;letter-spacing: 0;">
									{{item.nickName}}
								</view>
								<view
									style="margin-left: auto;font-family: PingFang-SC-Regular;font-size: 22upx;color: #FFFFFF;letter-spacing: 0;">
									{{item.contributionValue}}pk值
								</view>



								<view style="width: 50upx;">
								</view>

							</view>
						</scroll-view>

					</swiper-item>
					<swiper-item>

						<!-- <scroll-view  scroll-y="true" style="height:730upx;"  >  </scroll-view> -->


						<!-- scroll-view class="scroll-view_H" -->
						<scroll-view scroll-y="true" style="height:730upx;">
							<view class="gxbqs">

								<view class="gxitem" style="position: relative;">
									<view style="height: 15upx;"></view>
									<image style="width: 50upx; height: auto;position: absolute;z-index: 99;"
										src="https://webapp.test.shenghua6.cn/st/mini/static/img/xcxydy/zser.png"
										mode="widthFix"></image>
									<view class="gxqq">
										<image v-if="gxblistss.length>=2"
											style="width:120upx;height: 120upx; border-radius: 50%;"
											:src="$global.getImageUrl(gxblistss[1].headImg+'?x-oss-process=image/bright,15/resize,m_fill,h_150,w_150', 'https://ourydcimage.shenghua6.cn')"
											mode="" @click="grenziluty(gxblistss[1].userId)"></image>

										<image v-else style="width:120upx;height: 120upx; border-radius: 50%;"
											src="https://ourydcimage.shenghua6.cn/2017/01/02/2017010200514854100.png"
											mode="">
										</image>


									</view>
									<view class="pkbdname">

										<text v-if="gxblistss.length>=2"> {{gxblistss[1].nickName}} </text>
										<text v-else> 虚位以待</text>

									</view>
									<view class="pkzhi">
										<text v-if="gxblistss.length>=2"> {{gxblistss[1].contributionValue}}pk值 </text>
									</view>
								</view>

								<view class="gxitem" style="position:relative;">
									<image style="width:55upx; height: auto;position: absolute;z-index: 99;top: -8upx;"
										src="https://webapp.test.shenghua6.cn/st/mini/static/img/xcxydy/zdk.png"
										mode="widthFix"></image>
									<view class="gxqq">
										<image v-if="gxblistss.length>=1"
											style="width:120upx;height: 120upx; border-radius: 50%;"
											:src="$global.getImageUrl(gxblistss[0].headImg+'?x-oss-process=image/bright,15/resize,m_fill,h_150,w_150', 'https://ourydcimage.shenghua6.cn')"
											mode="" @click="grenziluty(gxblistss[0].userId)"></image>

										<image v-else style="width:120upx;height: 120upx; border-radius: 50%;"
											src="https://ourydcimage.shenghua6.cn/2017/01/02/2017010200514854100.png"
											mode="">
										</image>
									</view>
									<view class="pkbdname">
										<text v-if="gxblistss.length>=1"> {{gxblistss[0].nickName}} </text>
										<text v-else> 虚位以待</text>
									</view>
									<view class="pkzhi">
										<text v-if="gxblistss.length>=1"> {{gxblistss[0].contributionValue}}pk值 </text>
									</view>
								</view>


								<view class="gxitem" style="position: relative;">
									<view style="height: 15upx;"></view>
									<image style="width: 50upx; height: auto;position: absolute;z-index: 99;"
										src="https://webapp.test.shenghua6.cn/st/mini/static/img/xcxydy/zfs.png"
										mode="widthFix"></image>
									<view class="gxqq">
										<image v-if="gxblistss.length>=3"
											style="width:120upx;height: 120upx; border-radius: 50%;"
											:src="$global.getImageUrl(gxblistss[2].headImg+'?x-oss-process=image/bright,15/resize,m_fill,h_150,w_150', 'https://ourydcimage.shenghua6.cn')"
											mode="" @click="grenziluty(gxblistss[2].userId)"></image>
										<image v-else style="width:120upx;height: 120upx; border-radius: 50%;"
											src="https://ourydcimage.shenghua6.cn/2017/01/02/2017010200514854100.png"
											mode="">
										</image>
									</view>
									<view class="pkbdname">
										<text v-if="gxblistss.length>=3"> {{gxblistss[2].nickName}} </text>
										<text v-else> 虚位以待</text>
									</view>
									<view class="pkzhi">
										<text v-if="gxblistss.length>=3"> {{gxblistss[2].contributionValue}}pk值 </text>
									</view>
								</view>
							</view>
							<view class="gxblist" v-for="(item,index) in gxblistss" v-if="index>2">
								<view style="width:80upx;text-align: center;">
									{{index+1}}
								</view>
								<image style="width:90upx;height: 90upx; border-radius: 50%;"
									:src="$global.getImageUrl(item.headImg+'?x-oss-process=image/bright,15/resize,m_fill,h_150,w_150', 'https://ourydcimage.shenghua6.cn')"
									mode="" @click="grenziluty(item.userId)"></image>
								<view style="width:30upx;"></view>
								<view
									style="font-family: PingFang-SC-Regular;font-size: 22upx;color: #FFFFFF;letter-spacing: 0;">
									{{item.nickName}}
								</view>
								<view
									style="margin-left: auto;font-family: PingFang-SC-Regular;font-size: 22upx;color: #FFFFFF;letter-spacing: 0;">
									{{item.contributionValue}}pk值
								</view>
								<view style="width: 50upx;">
								</view>
							</view>
						</scroll-view>
					</swiper-item>
				</swiper>
			</view>
		</u-popup>

		<u-popup v-model="shareShowd" mode="center">
			<image src="https://webapp.test.shenghua6.cn/st/mini/static/img/xcxydy/xiazaitanch.png" style="height: auto;"
				mode="widthFix">
			</image>
			<view style="display:flex;width:100%;margin:-190upx auto;height: 20rpx;">
				<button style="width:50%; height:120upx; display: flex;align-items: center; border:none;" plain="true"
					@click="downApps()">
					<image style="width:100%;height: auto;" :src="$BASE_URL +'/st/mini/static/img/gender/fuzhi.png'"
						mode="widthFix">
					</image>
				</button> <button style="width:50%; height:120upx; display: flex;align-items: center; border:none;"
					open-type="contact" plain="true" @click="jinrfxkf">
					<image style="width:100%;height: auto;" :src="$BASE_URL +'/st/mini/static/img/gender/qxz.png'"
						mode="widthFix">
					</image>
				</button>
			</view>
			<view
				style="font-family: PingFangSC-Regular;font-size:26upx;color: #5C60B6;text-align:center;margin-top: 290upx;">
				复制后请在浏览器打开
			</view>
			<view style="height:35upx;"></view>
		</u-popup>
	</view>
</template>




<!-- pk背景图 -->
<!-- https://php.zgsj1.com/upload_video/20211115/0a7a9c1f61c17bd70a88169d201610da.png -->
<!-- pk规则 -->
<!-- "https://php.zgsj1.com/upload_video/20211115/ef5d3ed5ed47d8d429bef393b3c41762.png" -->
<!-- 榜单背景 -->
<!-- https://php.zgsj1.com/upload_video/20211115/a93ec4f234e0d3b1274c7e9394d40e92.png -->
<!-- 我方贡献榜 -->
<!-- https://php.zgsj1.com/upload_video/20211115/542ee4e782aded641689e3fc48429374.png -->
<!-- 对方贡献榜 -->
<!-- https://php.zgsj1.com//upload_video/20211115/466ec67a77166ab22439ba7b3c1ef202.png -->
<!-- 胜利 -->
<!-- https://php.zgsj1.com/upload_video/20211115/21ae6786eef93cc1e392dec988da9b13.png -->
<!-- 失败 -->
<!-- https://php.zgsj1.com/upload_video/20211115/78e88ac06246d038641dc859378a8b78.png -->
<!-- 平局 -->
<!-- https://php.zgsj1.com/upload_video/20211115/fccf77dc3dc701db3dd9161b3fd496b0.png -->
<!-- 对抗进度 -->
<!-- https://php.zgsj1.com/upload_video/20211115/e225cc89a7a6439707587b5b6792d7f6.png -->
<!-- pk观众列表 -->
<!-- https://php.zgsj1.com/upload_video/20211115/d5a0edbd8de10ac5fea21968ecc85d6e.png -->
<!-- pk大图标 -->
<!-- https://php.zgsj1.com/upload_video/20211115/26bc0c4d73a91215f0fd1a88f2b50022.png -->
<!-- 蓝色座位 -->
<!-- https://php.zgsj1.com/upload_video/20211115/91174d823581531356c5b263f068d7b5.png -->
<!-- 红色座位 -->
<!-- https://php.zgsj1.com/upload_video/20211115/68b959dc875ec25075dd9c58a8c95ee2.png -->
<!-- 贡献榜钻石1 -->
<!-- https://php.zgsj1.com/upload_video/20211115/2459b69199c36a0e945fd3b0215cb0f8.png -->
<!-- 贡献榜钻石2 -->
<!-- https://php.zgsj1.com/upload_video/20211115/dd5359e7dfca7866b7fd81c9374f8b7f.png -->
<!-- 贡献榜钻石3 -->
<!-- https://php.zgsj1.com/upload_video/20211115/1182946d90f5f1d87f0dda50d62ba9a7.png -->

<!-- 贡献榜钻石圈 -->
<!-- https://php.zgsj1.com/upload_video/20211115/25ee36b33fbc4e4e655c50a6bd7f1c83.png -->

<!-- 榜单名字背景 -->
<!-- https://php.zgsj1.com/upload_video/20211116/3cc53c430ebe1fe837c5205fb7b1fae2.png -->

<!-- mvp 标识 -->
<!-- https://php.zgsj1.com/upload_video/20211116/8247c9e8b5e503a7d1b0a2ba744b9063.png -->

<!-- 免费聊天次数 -->
<!-- https://php.zgsj1.com/upload_video/20211208/08cf1c9122681ed6658bb0ba64d22837.png -->
<!-- pk图标 -->
<!-- https://php.zgsj1.com/upload_video/20211215/fed88c554fba2f0b652045da54962aa1.png -->
<!-- pk进度条里的中间图标 -->
<!-- https://php.zgsj1.com/upload_video/20211221/6a9be89dbee055b4f1f21c5433ff90a0.png -->





<script>
	var animationUrlData = []
	var data2 = []
	const {
		Parser,
		Player
	} = require("@/commons/svgaplayer.weapp")
	import {
		decrypt,
		noncer,
		genSignature
	} from "@/commons/util.des.js";
	var chatroom = ''
	import SDK from '@/commons/NIM_Web_SDK_miniapp_v8.5.0.js'
	const AgoraMiniappSDK = require('@/commons/Agora_Miniapp_SDK_for_WeChat.js');
	import {
		Base64
	} from '@/commons/base64.js';

	// 房间名称滚动
	import textScroll from '@/pages/components/textScroll/index';

	import lpainter from '@/lime-painter/components/lime-painter'


	import Utils from '../../../utils/util.js'


	export default {
		components: {
			textScroll,
			lpainter
		},

		data() {
			return {


				// 生成海报需要的头像图片
				tximgs: '',


				// 可以发送多少条消息
				messageCount: 3,

				// 个人资料照片下的点
				dianguan: false,

				// 本周收到的礼物数量
				zongshul: 0,


				// 聊天弹窗距离下
				Heights: 0,

				// 抛开排行榜的 滑动模块
				currentTabs: 1,

				// 聊天自己的头像
				iheadImg: '',

				// 对方的头像
				headImg: "",

				// 引导下载弹窗
				shareShowd: false,

				// 按钮样式
				bottomstyle: false,

				nodes: '测试数据',

				// 发送的内容
				nero: "",


				// 聊天的表情
				emoji: {},

				// 消息id判断是否重复
				xxid: 0,

				// 聊天对方的名子
				titless: '聊天',
				// 聊天对方的id
				to: 0,

				// 私聊聊天记录列表
				ltlist: [],

				// 聊天向上
				scrollTops: 0,

				// 聊天弹窗页
				liaotianye: false,
				// 私聊
				siliao: false,

				// 私聊列表
				sllist: [],

				listd: [],


				// 直播的麦上光环
				zhibogq: true,

				// PK结果
				pkresult: 0,
				pklist: {},
				// 我方pk值
				fromContribut: 0,

				// 对方pk值
				toContribut: 0,

				// 自己队列
				fromList: [],
				// 对方队列
				toList: [{}, {}, {}, {}],



				// pk开启
				kqpk: false,
				// 贡献列表数据
				// 我方
				gxblists: [

				],
				// 对方
				gxblistss: [



				],

				// pk进度条
				pressWidth: '50%',
				// 贡献榜弹窗
				gongxianbang: false,
				gxb: 1,
				// pk规则弹窗
				pkguize: false,
				// 房主的 是否被 关注的状态
				dqisAttention: 1,
				// 直播类别
				zblb: 0,
				// 自己的id
				uuuid: 0,
				// 自动获取焦点
				focusState: false,
				// 个人资料
				gerezilial: {},
				// 打开底部个人资料
				gerenzl: false,
				// 目前有几个选中状态
				ziliaos: [],
				// 个人资料按钮 是否展示
				ziliao: false,
				// 临时麦上头像存放数据
				lsData: [],
				// 手动更新的在线列表
				zxlib: [],
				// 麦下列表的长度
				maixchadu: 100,

				// 局部下拉刷新
				triggered: true,

				// 生成海报的json串
				base: {},
				haibaodizhi: '',

				gensuipng: '',

				// 礼物跟随动画特效png
				pnglist: [],
				animationData: {},
				// 在data中初始化 动画的 animationData
				timera: null,
				timerb: null,
				timerc: null,
				timerd: null,
				timere: null,
				timerf: null,
				timerg: null,

				// 直播厅的光环
				zbghs: null,

				// PK时候我方光环
				wofangpkgh: null,
				// pk时候对方光环
				duifangpkgh: null,



				// pk 倒计时 

				pktime: null,

				// 时分秒
				hr: 0,
				min: '00',
				sec: '00',







				// 判断声波是否播放的数组
				guolvxiabiao: [],

				pay: {},
				animationData: {},
				boardRemark: '',
				autoplay: false,
				// 播放音频的url
				DHurl: "https://ourydcimage.shenghua6.cn/animate/svga/applet/1_52100_8/1_52100_8.mp3",
				wanfa: true,
				// 充值的弹窗
				shareShows: false,
				// touxiang: 'https://ourydcimage.shenghua6.cn/2021/01/30/2021013016590950146.jpg',
				erweima: this.$BASE_URL + '/st/mini/static/img/chatRoomDetails/mini.jpg',
				ratio: 1,
				ctx: null, // 创建canvas对象
				canvasToTempFilePath: null, // 保存最终生成的导出的图片地址
				openStatus: true, // 声明一个全局变量判断是否授权保存到相册
				// 房主的id
				uids: 0,
				// 房主的头像
				ufztx: '',
				maike: false,
				// /特效高度
				clientHeight: 0,
				Height: 0,

				peopleDataold: [],

				// 麦下用户数量
				peopleDatalent: 0,
				// 时间计时器
				iTime: '',

				// 总麦位数量
				zmaiwei: 0,

				// 赠送的显示隐藏
				zengsong: false,
				// 记录点击自己的头像的时候的位置id
				zjindx: 0,
				fangzhu: {}, //房主信息
				maix: [], //礼物天窗上的买上列表
				isMute: false, //是否禁言,禁言状态下普通成员不能发送消息, 创建者和管理员可以发送消息  --true:禁言 false：解除禁言
				quanmai: true, //全麦与否
				mkShow: false, //麦克授权
				pushurl: '',
				onLineUser: 0, //热度
				maxSeatNum: 0,
				minSeatNum: 0,
				circleShow: true,
				// 连麦隐藏				
				lianmai: true,

				giftShow1: false,

				giftShow2: false,
				seat: -1,
				numShow: false,
				giftNumShow: false,
				giftIndex: 0,
				giftNumData: [{
					num: 1,
					name: '一心一意'
				}, {
					num: 10,
					name: '十全十美'
				}, {
					num: 66,
					name: '一切顺利'
				}, {
					num: 99,
					name: '长长久久'
				}, {
					num: 188,
					name: '要抱抱'
				}, {
					num: 520,
					name: '我爱你'
				}, {
					num: 1314,
					name: '一生一世'
				}],
				giftnum: 1,
				// 聊天框内容
				mesgtext: '',
				current: 0,
				circular: true,
				isIndex: 0,
				isIndex1: 0,
				tabData: ['钻石', '金币', '背包'],
				$BASE_URL: this.$BASE_URL,
				man: '',
				woman: '',
				no: '',
				giftShow: false,
				// 在线列表开关
				onlineShow: false,
				wanShow: false,
				// 打赏自己 下麦的弹窗
				downShow: false,

				shareShow: false,
				shareShow1: true,
				ssssss: false,
				url: '',
				scrollViewH: "",
				scrollTop: 0,
				// 麦上数据
				chatData: [],
				listName: '',
				txImg: '',
				// 贡献值
				zsNum: 0,
				roomName: '',
				identityId: '',
				managerNickName: '',
				roomId: '',
				bodyMovinList: [], // 礼物播放列表
				bodyMoyin: true, // 动画播放的状态 true为空闲
				m3u8Url: '', // 拉流地址
				nickName: '', // 用户昵称
				audioUrl: '', // 礼物背景音乐
				ios: '', // 是否是ios设备 true fasle
				liveOver: false, //聊天室 是否结束
				hBgImg: '', // 房主的信息
				privateRoom: false,
				roomType: '',
				lwcode: [],
				chatRoomAddress: '', //房间地址
				queueCount: 0,
				getIntoTxt: '',
				vipnTxt: '',
				liaottianTxt: '',
				liaottianTxtData: [],
				// 聊天室背景图
				bgImg: '',
				// /animate/svga/applet/103_520000_1/103_520000_1.svga
				wzUrl: "https://ourydcimage.shenghua6.cn/expressionImg/show/",
				height: '',
				statusBarHeight: '',
				share: {
					title: '语音交友  就上哩咔',
					path: '',
					imageUrl: '',
					desc: '',
					content: ''
				},
				// 上麦信息的集合/*  */
				giftData: [],
				zuanshiData: [],
				jinbiData: [],
				beibaoData: [],
				client: '',
				roomIntroduce: '',
				channelId: '',
				// 麦下 列表 用户
				peopleData: [],
				peopleData1: [],
				peopleData2: [],

				// 礼物上的人物列表
				peopleData3: [],
				peopleData4: [],

				// 在线列表
				peopleData6: [],
				chatroom: '',
				dataList: [],
				managerUserId: '',
				managerHeadImg: '',
				token: '',
				userId: '',
				chatRoomBeckoning: [],
				fromCustom: {},
				chatroomEnterCustom: {},
				offSeatIndex: 0,
				msgs: [],
				bgUrl: '',
				num: 1,
				num1: '',
				// 礼物id
				propId: '',
				animationUrl: '',
				zengsongShow: false,
				m3u8UrlData: [],
				// 钻石数量
				diamond: 0, //钻石数量
				// 金币数量
				score: 0,
				downloadUrl: '',
				message: '',
				animationUrlData: [],
				i: 0,
				show: true,
				mineuserId: '',
				mvp: '',
				low: '',
				tapTime: 0, // 防止两次点击操作间隔太快
				bjheight: 0,
				bjwidth: 0,
				// 麦上光环
				maihuan: '',

			}
		},
		onLoad(option) {
			console.log(option, "optionoptionoptoptionoptionoptionoptionoptionion")
			// 房间id
			this.roomId = option.roomId
			// 和 声网 建立连接的 id
			this.channelId = option.channelId


			uni.showLoading({
				title: '加载中',
				mask: true
			});
			//声网的初始化
			this.initFZFn();
			// 声明全局函数
			this.innerAudioContext = uni.createInnerAudioContext();

			// 礼物跟随动画
			this.animation = uni.createAnimation()
			// 创建动画实例
			var _this = this

			// 直播pk的麦上波环
			clearTimeout(_this.wofangpkgh);
			clearTimeout(_this.duifangpkgh);
			// 取消 pk 倒计时
			clearTimeout(_this.pktime);
			// 直播厅的光环
			clearTimeout(_this.zbghs);
			_this.zbghs = null;
			// 销毁声波光环
			clearTimeout(_this.timera);
			_this.timera = null;
			clearTimeout(_this.timerb);
			_this.timerb = null;
			clearTimeout(_this.timerc);
			_this.timerc = null;
			clearTimeout(_this.timerd);
			_this.timerd = null;
			clearTimeout(_this.timere);
			_this.timere = null;
			clearTimeout(_this.timerf);
			_this.timerf = null;
			clearTimeout(_this.timerg);
			_this.timerg = null;


			setTimeout(function() {
				// 开启声波光环

				// return
				if (_this.zblb == 27) {
					// 女神厅的波环
					_this.shengbozhixing()
				} else if (_this.zblb == 33) {
					// 直播厅的波环
					_this.zbguanghuan()
				}
			}, 2000)


			// 在下列表局部刷新
			_this._freshing = false;
			setTimeout(() => {
				_this.triggered = true;

				// 生成海报的必要参数
				_this.hbsc()

				console.log('生成海报的参数6666666666666666666666666666666666', this.base)

			}, 1000)



			// 观察者模式 更新会话列表
			uni.$on('update', (e) => {

				_this.hqlib();

			})


			// 获取 消息列表
			this.hqlib();

			// 赋值表情
			_this.emoji = {
				"emoji": {
					"[大笑]": {
						file: "emoji_0.png"
					},
					"[可爱]": {
						file: "emoji_01.png"
					},
					"[色]": {
						file: "emoji_02.png"
					},
					"[嘘]": {
						file: "emoji_03.png"
					},
					"[亲]": {
						file: "emoji_04.png"
					},
					"[呆]": {
						file: "emoji_05.png"
					},
					"[口水]": {
						file: "emoji_06.png"
					},
					"[汗]": {
						file: "emoji_145.png"
					},
					"[呲牙]": {
						file: "emoji_07.png"
					},
					"[鬼脸]": {
						file: "emoji_08.png"
					},
					"[害羞]": {
						file: "emoji_09.png"
					},
					"[偷笑]": {
						file: "emoji_10.png"
					},
					"[调皮]": {
						file: "emoji_11.png"
					},
					"[可怜]": {
						file: "emoji_12.png"
					},
					"[敲]": {
						file: "emoji_13.png"
					},
					"[惊讶]": {
						file: "emoji_14.png"
					},
					"[流感]": {
						file: "emoji_15.png"
					},
					"[委屈]": {
						file: "emoji_16.png"
					},
					"[流泪]": {
						file: "emoji_17.png"
					},
					"[嚎哭]": {
						file: "emoji_18.png"
					},
					"[惊恐]": {
						file: "emoji_19.png"
					},
					"[怒]": {
						file: "emoji_20.png"
					},
					"[酷]": {
						file: "emoji_21.png"
					},
					"[不说]": {
						file: "emoji_22.png"
					},
					"[鄙视]": {
						file: "emoji_23.png"
					},
					"[阿弥陀佛]": {
						file: "emoji_24.png"
					},
					"[奸笑]": {
						file: "emoji_25.png"
					},
					"[睡着]": {
						file: "emoji_26.png"
					},
					"[口罩]": {
						file: "emoji_27.png"
					},
					"[努力]": {
						file: "emoji_28.png"
					},
					"[抠鼻孔]": {
						file: "emoji_29.png"
					},
					"[疑问]": {
						file: "emoji_30.png"
					},
					"[怒骂]": {
						file: "emoji_31.png"
					},
					"[晕]": {
						file: "emoji_32.png"
					},
					"[呕吐]": {
						file: "emoji_33.png"
					},
					"[拜一拜]": {
						file: "emoji_160.png"
					},
					"[惊喜]": {
						file: "emoji_161.png"
					},
					"[流汗]": {
						file: "emoji_162.png"
					},
					"[卖萌]": {
						file: "emoji_163.png"
					},
					"[默契眨眼]": {
						file: "emoji_164.png"
					},
					"[烧香拜佛]": {
						file: "emoji_165.png"
					},
					"[晚安]": {
						file: "emoji_166.png"
					},
					"[强]": {
						file: "emoji_34.png"
					},
					"[弱]": {
						file: "emoji_35.png"
					},
					"[OK]": {
						file: "emoji_36.png"
					},
					"[拳头]": {
						file: "emoji_37.png"
					},
					"[胜利]": {
						file: "emoji_38.png"
					},
					"[鼓掌]": {
						file: "emoji_39.png"
					},
					"[握手]": {
						file: "emoji_200.png"
					},
					"[发怒]": {
						file: "emoji_40.png"
					},
					"[骷髅]": {
						file: "emoji_41.png"
					},
					"[便便]": {
						file: "emoji_42.png"
					},
					"[火]": {
						file: "emoji_43.png"
					},
					"[溜]": {
						file: "emoji_44.png"
					},
					"[爱心]": {
						file: "emoji_45.png"
					},
					"[心碎]": {
						file: "emoji_46.png"
					},
					"[钟情]": {
						file: "emoji_47.png"
					},
					"[唇]": {
						file: "emoji_48.png"
					},
					"[戒指]": {
						file: "emoji_49.png"
					},
					"[钻石]": {
						file: "emoji_50.png"
					},
					"[太阳]": {
						file: "emoji_51.png"
					},
					"[有时晴]": {
						file: "emoji_52.png"
					},
					"[多云]": {
						file: "emoji_53.png"
					},
					"[雷]": {
						file: "emoji_54.png"
					},
					"[雨]": {
						file: "emoji_55.png"
					},
					"[雪花]": {
						file: "emoji_56.png"
					},
					"[爱人]": {
						file: "emoji_57.png"
					},
					"[帽子]": {
						file: "emoji_58.png"
					},
					"[皇冠]": {
						file: "emoji_59.png"
					},
					"[篮球]": {
						file: "emoji_60.png"
					},
					"[足球]": {
						file: "emoji_61.png"
					},
					"[垒球]": {
						file: "emoji_62.png"
					},
					"[网球]": {
						file: "emoji_63.png"
					},
					"[台球]": {
						file: "emoji_64.png"
					},
					"[咖啡]": {
						file: "emoji_65.png"
					},
					"[啤酒]": {
						file: "emoji_66.png"
					},
					"[干杯]": {
						file: "emoji_67.png"
					},
					"[柠檬汁]": {
						file: "emoji_68.png"
					},
					"[餐具]": {
						file: "emoji_69.png"
					},
					"[汉堡]": {
						file: "emoji_70.png"
					},
					"[鸡腿]": {
						file: "emoji_71.png"
					},
					"[面条]": {
						file: "emoji_72.png"
					},
					"[冰淇淋]": {
						file: "emoji_73.png"
					},
					"[沙冰]": {
						file: "emoji_74.png"
					},
					"[生日蛋糕]": {
						file: "emoji_75.png"
					},
					"[蛋糕]": {
						file: "emoji_76.png"
					},
					"[糖果]": {
						file: "emoji_77.png"
					},
					"[葡萄]": {
						file: "emoji_78.png"
					},
					"[西瓜]": {
						file: "emoji_79.png"
					},
					"[光碟]": {
						file: "emoji_80.png"
					},
					"[手机]": {
						file: "emoji_81.png"
					},
					"[电话]": {
						file: "emoji_82.png"
					},
					"[电视]": {
						file: "emoji_83.png"
					},
					"[声音开启]": {
						file: "emoji_84.png"
					},
					"[声音关闭]": {
						file: "emoji_85.png"
					},
					"[铃铛]": {
						file: "emoji_86.png"
					},
					"[锁头]": {
						file: "emoji_87.png"
					},
					"[放大镜]": {
						file: "emoji_88.png"
					},
					"[灯泡]": {
						file: "emoji_89.png"
					},
					"[锤头]": {
						file: "emoji_90.png"
					},
					"[烟]": {
						file: "emoji_91.png"
					},
					"[炸弹]": {
						file: "emoji_92.png"
					},
					"[枪]": {
						file: "emoji_93.png"
					},
					"[刀]": {
						file: "emoji_94.png"
					},
					"[药]": {
						file: "emoji_95.png"
					},
					"[打针]": {
						file: "emoji_96.png"
					},
					"[钱袋]": {
						file: "emoji_97.png"
					},
					"[钞票]": {
						file: "emoji_98.png"
					},
					"[银行卡]": {
						file: "emoji_99.png"
					},
					"[手柄]": {
						file: "emoji_100.png"
					},
					"[麻将]": {
						file: "emoji_101.png"
					},
					"[调色板]": {
						file: "emoji_102.png"
					},
					"[电影]": {
						file: "emoji_103.png"
					},
					"[麦克风]": {
						file: "emoji_104.png"
					},
					"[耳机]": {
						file: "emoji_105.png"
					},
					"[音乐]": {
						file: "emoji_106.png"
					},
					"[吉他]": {
						file: "emoji_107.png"
					},
					"[火箭]": {
						file: "emoji_108.png"
					},
					"[飞机]": {
						file: "emoji_109.png"
					},
					"[火车]": {
						file: "emoji_110.png"
					},
					"[公交]": {
						file: "emoji_111.png"
					},
					"[轿车]": {
						file: "emoji_112.png"
					},
					"[出租车]": {
						file: "emoji_113.png"
					},
					"[警车]": {
						file: "emoji_114.png"
					},
					"[自行车]": {
						file: "emoji_115.png"
					}
				}
			}




		},
		onShareAppMessage() {

			var that = this
			return {
				title: this.share.title,
				path: this.share.path,
				imageUrl: this.share.imageUrl,
				imageUrl: this.hBgImg,
				content: this.share.content,
				desc: this.share.desc,
				success: res => {
					that.shareShow = false
					that.shareShow1 = false
				}
			}
		},
		/**
		 * 生命周期函数--监听页面初次渲染完成
		 */
		onReady() {


		},
		onShow() {

			// 查询聊天可以发送多少条信息
			this.cxzs()


			console.log('触发每次进入')
			// 请求钻石数量
			var that = this

			// 获取系统信息
			wx.getSystemInfo({
				success: function(res) {
					// 获取可使用窗口宽度
					let clientHeight = res.windowHeight;
					// 获取可使用窗口高度
					let clientWidth = res.windowWidth;

					// 算出比例
					let ratio = 750 / clientWidth;
					// 算出高度(单位rpx)
					let height = clientHeight * ratio;

					// 设置高度
					console.log("height======", height)
					that.clientHeight = height + 300

					that.bjheight = clientHeight
					that.bjwidth = clientWidth

				}
			});

			// 请求钻石数量
			that.Diamonds()

			console.log(this.fangzhu, "account123")
			that.shareShow = false
			uni.getStorage({
				key: 'userInfo',
				success: function(res) {
					console.log(res, "account123")
					that.nickName = res.data.nickName
					that.headImg = res.data.headImg
					that.userId = res.data.userId
					that.token = res.data.imPwd
					// 钻石数量
					that.diamond = res.data.diamond
					// 金币数量
					that.score = res.data.score



					that.fromCustom = {
						"inChatRoomTime": 1625473644632,
						"role": 0,
						"headImg": res.data.headImg,
						"gender": res.data.sex,
						"nickName": that.nickName,
						"greeting": that.nickName + "进入聊天室，欢迎~",
						"admin": false,
						"isInChatRoomStealth": false,
						"aguid": "10010181",
						"circleRole": "0",
						"vipNew": res.data.costLevel,
						"isOurUser": "2",
						"realShowTxt": that.nickName + "进入聊天室，欢迎~",
						"isNewComer": false,
						"vipCard": "",
						"vip": res.data.costLevel,
						"age": res.data.age
					}
					console.log('vip等级', res.data.costLevel)

					that.chatroomEnterCustom = {
						"nobility": 1,
						"role": "0",
						"headImg": res.data.headImg,
						"nickName": that.nickName,
						"nobilityExpire": "1",
						"anchorLevel": 1,
						"roomId": "369651332",
						"isUserMember": "3",
						"vipNew": res.data.costLevel,
						"isOurUser": "2",
						"barrageFree": -10002,
						"vip": res.data.costLevel,
						"taillightDressId": "",
						"currentRoomCategory": 1
					}
				}
			});
			uni.getSystemInfo({
				success: function(res) {
					// model设备型号
					// iOS
					// 标题栏高度

					if (res.model.indexOf('iPhone') !== -1) {
						that.titleBarHeight = 44
					} else {
						that.titleBarHeight = 48
					}
					// 状态栏高度
					that.statusBarHeight = res.statusBarHeight
					that.height = that.titleBarHeight + that.statusBarHeight
				}
			})
			if (uni.getSystemInfoSync().platform == 'android') {
				this.getAppDownloadUrl('android')
			} else {
				this.getAppDownloadUrl('ios')
			}







			// H5 不支持的方法

			// 查看权限
			// #ifdef  MP-WEIXIN  				
			that.getSetting();
			// #endif
			// H5 不支持的方法
		},

		onHide() {
			console.log('销毁方法111111监听页面卸载111111111111111111111111')



			var _this = this
			// 直播pk的麦上波环
			clearTimeout(_this.wofangpkgh);
			clearTimeout(_this.duifangpkgh);
			// 取消 pk 倒计时
			clearTimeout(_this.pktime);
			// 直播厅的光环
			clearTimeout(_this.zbghs);
			_this.zbghs = null;
			// 销毁声波光环
			clearTimeout(_this.timera);
			_this.timera = null;
			clearTimeout(_this.timerb);
			_this.timerb = null;
			clearTimeout(_this.timerc);
			_this.timerc = null;
			clearTimeout(_this.timerd);
			_this.timerd = null;
			clearTimeout(_this.timere);
			_this.timere = null;
			clearTimeout(_this.timerf);
			_this.timerf = null;
			clearTimeout(_this.timerg);
			_this.timerg = null;

			// 销毁实例
			chatroom.destroy()
			// 退出频道
			_this.client.leave();

			_this.client.destroy()
			console.log('执行销毁页面操作开始')




		},

		// 监听页面卸载
		onUnload: function() {
			var _this = this
			// 直播pk的麦上波环
			clearTimeout(_this.wofangpkgh);
			clearTimeout(_this.duifangpkgh);
			// 取消 pk 倒计时
			clearTimeout(_this.pktime);
			// 直播厅的光环
			clearTimeout(_this.zbghs);
			_this.zbghs = null;
			// 销毁声波光环
			clearTimeout(_this.timera);
			_this.timera = null;
			clearTimeout(_this.timerb);
			_this.timerb = null;
			clearTimeout(_this.timerc);
			_this.timerc = null;
			clearTimeout(_this.timerd);
			_this.timerd = null;
			clearTimeout(_this.timere);
			_this.timere = null;
			clearTimeout(_this.timerf);
			_this.timerf = null;
			clearTimeout(_this.timerg);
			_this.timerg = null;

			console.log('销毁方法66666666666666666666监听页面卸载666666666666666666666666')

			// 销毁实例
			chatroom.destroy()
			// 退出频道
			_this.client.leave();

			_this.client.destroy()
			console.log('执行销毁页面操作开始')


			// 直播pk的麦上波环
			clearTimeout(_this.wofangpkgh);

			clearTimeout(_this.duifangpkgh);
			// 取消 pk 倒计时
			clearTimeout(_this.pktime);

			// 直播厅的光环
			clearTimeout(_this.zbghs);
			_this.zbghs = null;
			// 销毁声波光环
			clearTimeout(_this.timera);
			_this.timera = null;
			clearTimeout(_this.timerb);
			_this.timerb = null;
			clearTimeout(_this.timerc);
			_this.timerc = null;
			clearTimeout(_this.timerd);
			_this.timerd = null;
			clearTimeout(_this.timere);
			_this.timere = null;
			clearTimeout(_this.timerf);
			_this.timerf = null;
			clearTimeout(_this.timerg);
			_this.timerg = null;



			// 当前用户下麦
			_this.offSeat()
			animationUrlData = []
			// 销毁声音播放动画的实例
			// destroy
			_this.innerAudioContext.destroy(() => {
				// 结束播放监听
				console.log('销毁动画语音实例');
				// this.audioPlay = false;
			});

			_this.animationData = {}
			// 页面关闭后清空数据

			console.log('执行销毁页面操作结束')

			// 移除监听事件  
			uni.$off('updateHH');


		},
		mounted() {
			this.man = this.$BASE_URL + '/st/mini/static/img/sex/man.png'
			this.woman = this.$BASE_URL + '/st/mini/static/img/sex/woman.png'
			this.no = this.$BASE_URL + '/st/mini/static/img/sex/no.png'
			this.mvp = this.$BASE_URL + '/st/mini/static/img/chatRoomDetails/mvp.png'
			this.bgUrl = this.$BASE_URL + '/st/mini/static/img/chatRoomDetails/shuliang.png'
			this.low = this.$BASE_URL + '/st/mini/static/img/chatRoomDetails/low.png'
			// this.maihuan = this.$BASE_URL + "/st/mini/static/img/gender/guardian.svga"
			this.maihuan = 'https://webapp.test.shenghua6.cn/st/mini/static/img/gender/guardian.svga'
			// var td = this.$BASE_URL + 'animate/guard1.svga'
			this.check()
			// 赋值自己的id
			this.uuuid = uni.getStorageSync("userInfo").userId
		},
		methods: {
			// 查询聊天可以发送多少条信息
			cxzs: function() {
				var data = {
					url: "/web/v2//api/newApi/wechat/faxianListShowCount",
					methods: "post",
					data: {

					},
				};

				var _this = this

				this.$http(data).then(res => {

					if (res.data.code == 21000) {
						_this.messageCount = res.data.data.messageCount

					}

				})

			},




			sssss: function() {
				var _this = this
				_this.client.destroy()
				// _this.client.leave();
				console.log('执行退出频道')
			},
			// pk排行榜的 滑动内容
			swiperChanges: function(e) {
				var re = this.fangdou()
				if (!re) {
					console.log('不行')
					return
				}


				this.currentTabs = e.detail.current


				if (e.detail.current == 0) {
					// 贡献榜查询
					this.gongxianbcx(1)
				} else {
					this.gongxianbcx(2)

				}








			},



			//      对弹窗 内的操作，
			tuanchuangnecz: function(i, e) {

				console.log('弹窗内的操作', i, e)
				// #ifdef  MP-WEIXIN

				// PopUpClick	弹窗内点击		$预置属性		
				// 		$is_first_time	是否首次	BOOL	
				// 		button_name	按钮名称	STRING	引导下载APP海报弹窗复制链接/引导下载APP海报弹窗点击下载/下载APP弹窗取消/下载APP弹窗一键复制/关注公众号充值弹窗保存
				// 		PopUp_name	弹窗名称	STRING	引导下载APP海报弹窗/下载APP弹窗/关注公众号充值弹窗
				// 		current_page	当前页面	STRING	交友tab/一对一消息/厅内/我tab
				// 		room_id	房间ID	STRING	
				getApp().sensors.track('PopUpClick', {
					$is_first_time: uni.getStorageSync("shifoushouci") == 2 ? 'false' : 'true',
					PopUp_name: i,
					button_name: e,
					current_page: '厅内',
					room_id: this.roomId,
				})
				// #endif
			},

			// 弹窗埋点
			tanchaungmd: function(e) {

				// #ifdef  MP-WEIXIN  
				// PopUpShow	弹窗浏览		$预置属性		
				// 		$is_first_time	是否首次	BOOL	
				// 		PopUp_name	弹窗名称	STRING	引导下载APP海报弹窗/下载APP弹窗/关注公众号充值弹窗
				// 		current_page	当前页面	STRING	交友tab/一对一消息/厅内/我tab/
				// 		room_id	房间ID	STRING	
				getApp().sensors.track('PopUpShow', {
					$is_first_time: uni.getStorageSync("shifoushouci") == 2 ? 'false' : 'true',
					PopUp_name: e,
					current_page: '厅内',
					room_id: this.roomId,
				})
				// #endif

			},


			// 聊天部分
			//离开输入框触发
			leaveInput(e) {
				this.Heights = 0; //输入框失去焦点时让距离底部距离为 
				// console.log('失去焦点')
				// this.emojs = false
			},
			//点击输入框触发
			getHeight(e) {
				console.log(e, '我是获取输入法高度的')
				this.Heights = e.target.height; //获取输入法的高度，动态设置输入框距离顶部距离。
				// this.emojs = false
			},




			// 播放语音
			bofyuy: function(e) {
				console.log(e, "语音路径")


				var url = e
				// "https://nim-nosdn.netease.im/NDE1ODc0OQ==/bmltYV8zMjU0MDA5NjU5OF8xNjI4NzYzMDk5Mjg4X2U0ZjU2NjQ2LWU5OWYtNDI1OS04ODNlLTdiYmI3ZDE0ZGZmMg==?audioTrans&type=mp3"

				// return
				var _this = this
				// 是否在播放呢
				var state = this.innerAudioContext.paused;
				console.log('是否在播放呢', state)
				if (!state) {
					console.log('正在播放')

					this.innerAudioContext.stop(); //关闭
					// url 改成e
					if (this.url == url) {

					} else {

						this.innerAudioContext.src = url

						this.url = url

						// 开始播放
						this.innerAudioContext.play();


					}




				} else {
					console.log('没有正在播放')



					this.innerAudioContext.src = url

					this.url = url

					// 开始播放
					this.innerAudioContext.play();

				}

			},



			// 设为已读

			shewei: function() {

				var _this = this


				var ssid = 'p2p-' + this.to

				_this.$NIM.resetSessionUnread(ssid, (err, falid) => {
					console.log('重置会话未读状态')
					if (err) {
						console.log('充值失败：', err, '失败的sessionid是', failid)
					}

				})


			},






			// 监听输入框
			inputt: function(e) {


				var obj = this.nero.length
				var d = this.nero.split(" ").join("").length

				if (d === 0) {
					this.bottomstyle = false
				} else {
					this.bottomstyle = true
				}
			},

			// 触底下拉操作
			cdxl() {

			},

			// 发送
			fasong: function() {


				var re = this.fangdou()

				if (!re) {
					console.log('不行')
					return
				}

				if (this.bottomstyle) {
					this.wenben(this.nero)
				}
			},

			// 文本消息''
			wenben: function(e) {
				var _this = this
				var custom = this.custom

				// 把当前发送记录缓存到本地
				var us = uni.getStorageSync(this.to)

				// 达到三次禁止发送
				if (us >= this.messageCount) {
					_this.shareShowd = true

					// 弹窗埋点
					_this.tanchaungmd('引导下载APP海报弹窗');


					console.log('超出最大次数掉然后出弹窗')
					return
				}
				var msg = this.$NIM.sendText({
					scene: 'p2p',
					to: this.to,
					text: e,
					done: sendMsgDone,
					custom: this.custom
				});
				console.log('正在发送p2p text消息, id=' + msg.idClient);

				function sendMsgDone(error, msg) {


					var gllist = getApp().globalData
					var use = gllist[msg.sessionId]
					if (use) {
						var d = gllist[msg.sessionId]
						// 储存聊天信息
						gllist[msg.sessionId].push(msg);
					} else {
						// 储存聊天信息
						gllist[msg.sessionId] = []
						gllist[msg.sessionId].push(msg);
						_this.qqltjl()
					}


					console.log(error);
					console.log(msg);
					console.log('发送' + msg.scene + ' ' + msg.type + '消息' + (!error ? '成功' : '失败') + ', id=' +
						msg
						.idClient);
					if (!error) {

						if (us == "") {
							uni.setStorage({
								key: _this.to,
								data: 1,
								success: function() {
									console.log('success');
								}
							});
						} else {
							uni.setStorage({
								key: _this.to,
								data: parseInt(us) + 1,
								success: function() {
									console.log('success');
								}
							});
						}
						console.log('发送成功')
						_this.nero = ""
						_this.bottomstyle = false

					}
				}

			},








			// 展示 私聊 弹窗
			zsliaotlb: function() {
				this.siliao = true

			},



			// 关闭私聊页面
			siliaofanh: function() {

				this.liaotianye = false

			},



			// 打开私聊页面
			dakaisiliaoye: function(id) {

				console.log('id进入聊天详情', id)

				this.to = id
				// 自己的头像
				var img = uni.getStorageSync("userInfo").headImg;
				this.iheadImg = this.touxiang(img)
				console.log('自己的头像', this.iheadImg, '66666666666666', img)
				var _this = this
				_this.$NIM.getUser({
					account: id,
					done: getUserDone
				});

				function getUserDone(s, e) {
					console.log(e, "返回对方聊天信息666")
					console.log(e, "返回对方聊天信息")
					// 对方的头像
					_this.headImg = _this.touxiang(e.avatar)
					// 对方的名字


					_this.titless = e.nick


					if (e.account) {
						// 聊天弹窗页

						_this.liaotianye = true
						// 设为已读
						_this.shewei()
					}

				}


				// 提升页面高度
				this.qqltjl()
				var _this = this
				// 更新会话
				uni.$on('updateHH', (e) => {


					console.log(e, '更新会话')
					_this.scrollTops = _this.scrollTops + _this.ltlist.length * Math.random() * 1000
					// console.log(e, '更新会话')
					// if (e.addrsssid.lastMsg.status == 'success') {
					// 	_this.scrollTop = _this.scrollTop + _this.list.length * Math.random() * 1000
					// 	if (_this.xxid == e.addrsssid.lastMsg.idServer) {
					// 		return
					// 	}
					// 	// 赋值全局消息id
					// 	_this.xxid = e.addrsssid.lastMsg.idServer
					// 	console.log('发送结果成功', e.addrsssid.lastMsg.status)
					// 	var lid = e.addrsssid.lastMsg.from
					// 	var uid = uni.getStorageSync("userInfo").userId;
					// 	if (lid == _this.to || lid == uid) {
					// 		var sessionId = e.addrsssid.lastMsg.sessionId

					// 		console.log(sessionId, 'sessionId')

					// 		_this.ltlist.push(e.addrsssid.lastMsg)
					// 	}

					// } else {

					// 	console.log('发送结果失败', e.addrsssid.lastMsg.status)
					// }
				})

			},




			// 请求聊天记录
			qqltjl: function() {
				var _this = this
				var gllist = getApp().globalData
				var id = 'p2p-' + this.to
				_this.ltlist = gllist[id]
			},









			// 解析头像
			touxiang: function(e) {
				return this.$global.getImageUrl(e + '?x-oss-process=image/bright,15/resize,m_fill,h_150,w_150',
					"https://ourydcimage.shenghua6.cn")
			},







			// '?x-oss-process=image/bright,15/resize,m_fill,h_200,w_200'
			jiexiimg: function(e) {
				var item = JSON.parse(e)
				if (item) {
					// var img =  JSON.parse(item.nickName).headImg
					return this.$global.getImageUrl(item.headImg,
						"https://ourydcimage.shenghua6.cn"
					);
				}



			},




			// 获取 消息列表
			hqlib: function() {
				var _this = this

				var _this = this
				_this.sllist = getApp().globalData.huihua
				return


			},









			// 解析头像地址
			jiexi: function(e) {
				return this.headImg = this.$global.getImageUrl(e,
					"https://ourydcimage.shenghua6.cn"
				);
			},


			// 解析聊天列表时间
			// 解析时间
			jiexishijian: function(i, e) {

				var _this = this
				// _this.scrollTops = _this.scrollTops + _this.ltlist.length * Math.random() * 1000

				if (i > 0) {
					var sj = e - this.ltlist[i - 1].time

					if (sj < 120000) {
						console.log('不展示')
						return 0
					} else {

						console.log('展示')
					}

				}

				// var timestamp4 = new Date(e); //直接用 new Date(时间戳) 格式转化获得当前时间
				var time = new Date(e);
				var y = time.getFullYear();
				var m = time.getMonth() + 1;
				var d = time.getDate();
				var h = time.getHours();
				var mm = time.getMinutes();
				var s = time.getSeconds();
				return y + '-' + m + '-' + d + ' ' + h + ':' + mm + ':' + s;
				return new Date(parseInt(e)).toLocaleString().replace(/:\d{1,2}$/, ' ');
				// timestamp4.toLocaleDateString().replace(/\//g, "-") + " " + timestamp4.toTimeString().substr(0,8); //再利用拼接正则等手段转化为yyyy-MM-dd hh:mm:ss 格式
				console.log('解析时间', shijian)

			},









			// 私聊列表 时间解析
			getDateDiff: function(dateTimeStamp) {
				// console.log('需要解析的时间',dateTimeStamp)

				var minute = 1000 * 60;
				var hour = minute * 60;
				var day = hour * 24;
				var halfamonth = day * 15;
				var month = day * 30;
				var now = new Date().getTime();
				var diffValue = now - dateTimeStamp;
				// console.log('相差时间戳结果',diffValue)


				if (diffValue < 0) {
					var result = "刚刚";
					return result;

				}
				var monthC = diffValue / month;
				var weekC = diffValue / (7 * day);
				var dayC = diffValue / day;
				var hourC = diffValue / hour;
				var minC = diffValue / minute;

				if (monthC >= 1) {
					var result = "" + parseInt(monthC) + "月前";
				} else if (weekC >= 1) {
					var result = "" + parseInt(weekC) + "周前";
				} else if (dayC >= 1) {
					var result = "" + parseInt(dayC) + "天前";
				} else if (hourC >= 1) {
					var result = "" + parseInt(hourC) + "小时前";
				} else if (minC >= 1) {
					var result = "" + parseInt(minC) + "分钟前";
				} else
					var result = "刚刚";
				return result;
			},





			// 生成富文本方法

			generateRichTextNode(text) {

				let emoji = this.emoji.emoji


				let tempStr = text
				let richTextNode = []
				let leftBracketIndex = tempStr.indexOf('[')
				let rightBracketIndex = tempStr.indexOf(']')
				let countOfWord = 0


				Array.from(tempStr).map(item => {
					if (item != '[' && item != ']') {
						countOfWord++
					}
				})
				if (leftBracketIndex == -1 || rightBracketIndex == -1 || countOfWord == 0) { //没有emoji
					richTextNode.push({
						type: 'text',
						text: tempStr
					})
					return richTextNode
				}
				while (tempStr.length != 0) {
					leftBracketIndex = tempStr.indexOf('[')
					rightBracketIndex = tempStr.indexOf(']')
					if (leftBracketIndex == 0) { // 开头是[
						rightBracketIndex = tempStr.indexOf(']')
						if (rightBracketIndex == -1) {
							richTextNode.push({
								type: 'text',
								text: tempStr
							})
							tempStr = ''
						} else {
							let emojiName = tempStr.slice(0, rightBracketIndex + 1)

							if (emoji[emojiName]) { // 有效emoji

								richTextNode.push({
									name: 'img',
									attrs: {
										width: '30rpx',
										height: '30rpx',
										src: 'http://yx-web.nosdn.127.net/webdoc/h5/emoji/emoji/' + emoji[
											emojiName].file
									}
								})

							} else { //无效emoji
								richTextNode.push({
									type: 'text',
									text: emojiName
								})
							}
							tempStr = tempStr.substring(rightBracketIndex + 1, tempStr.length)
						}
					} else { // 开头不是[
						if (leftBracketIndex == -1) { // 最后全是文字
							richTextNode.push({
								type: 'text',
								text: tempStr.slice(0, tempStr.length)
							})
							tempStr = ''
						} else {
							richTextNode.push({
								type: 'text',
								text: tempStr.slice(0, leftBracketIndex)
							})
							tempStr = tempStr.substring(leftBracketIndex, tempStr.length + 1)
						}
					}
				}
				return richTextNode
			},











			// 倒计时

			countdown: function() {
				//定义this指向
				const that = this;

				//设置结束时间
				const end = that.pklist.endTime;
				//设置开始时间
				const now = new Date().getTime();

				// 做判断当倒计时结束时都为0
				if (now >= end) {

					that.day = 0;
					that.hr = 0;
					that.min = 0;
					that.sec = 0;
					return;
				}

				// 用结束时间减去当前时间获得倒计时时间戳
				const msec = end - now;
				let day = parseInt(msec / 1000 / 60 / 60 / 24); //算出天数
				let hr = parseInt((msec / 1000 / 60 / 60) % 24); //算出小时数
				let min = parseInt((msec / 1000 / 60) % 60); //算出分钟数
				let sec = parseInt((msec / 1000) % 60); //算出秒数
				//给数据赋值
				that.day = day;
				that.hr = hr > 9 ? hr : "0" + hr;
				that.min = min > 9 ? min : "0" + min;
				that.sec = sec > 9 ? sec : "0" + sec;
				// that.time =  hr + min + sec 

			},







			// 贡献榜查询
			gongxianbcx: function(e) {

				var _this = this
				var data = {
					url: '/web/v2/api/newApi/pkLive/contribution',
					methods: 'post',
					data: {
						roomId: this.roomId,
						type: e //1 = 我方 2 = 对方

					}
				}
				this.$http(data).then(res => {
					if (res.data.code == 21000) {


						if (e == 1) {

							_this.gxblists = res.data.data.data

						}

						if (e == 2) {

							_this.gxblistss = res.data.data.data

						}


					} else { //接口请求失败的处理

						uni.showToast({
							title: res.data.msg,
							icon: 'none'
						})
					}
				})







			},



			// 贡献榜切换

			gxbb: function(e) {
				this.gxb = e

				if (e == 1) {
					this.currentTabs = 0

				}

				if (e == 2) {
					this.currentTabs = 1
				}


				// 贡献榜查询
				this.gongxianbcx(e)

			},


			// 打开贡献榜
			gongxianb: function(e) {

				var res = this.fangdou()

				if (res) {
					console.log('行')

				} else {
					console.log('不行')
					this.gongxianbang = false
					return
				}



				this.gxb = e

				if (e == 1) {
					this.currentTabs = 0

				}

				if (e == 2) {
					this.currentTabs = 1
				}



				// 贡献榜开关
				this.gongxianbang = true

				// 贡献榜查询
				this.gongxianbcx(e)
				console.log('贡献榜')
			},


			// pk规则
			pkguiz: function() {
				console.log('pk规则')


				var res = this.fangdou()

				if (res) {
					console.log('行')
					this.pkguize = true
				} else {
					console.log('不行')
					this.pkguize = false
					return
				}


			},




			// 直播厅的波环
			zbguanghuan: function() {
				var _this = this
				this.zbghs = setInterval(function() {
					if (!_this.zhibogq) {
						return
					}
					const parser = new Parser();
					// 实例化  svgn 动画 播放
					const player = new Player();
					player.loops = 1;
					setTimeout(async () => {
						await player.setCanvas('#zbgh')
						// await player.setCanvas('#wofangpk')
						var url = _this.maihuan
						const videoItem = await parser.load(url);
						await player.setVideoItem(videoItem);
						player.startAnimation();
					}, 10);
				}, 2000);

			},


			// 直播pk波环

			zhibopkbohuan: function() {

				// // PK时候我方光环
				// wofangpkgh: null,
				// // pk时候对方光环
				// duifangpkgh: null,



				var _this = this
				this.wofangpkgh = setInterval(function() {


					const parser = new Parser();
					// 实例化  svgn 动画 播放
					const player = new Player();
					player.loops = 1;
					setTimeout(async () => {

						await player.setCanvas('#wofangpk')
						var url = _this.maihuan
						const videoItem = await parser.load(url);
						await player.setVideoItem(videoItem);
						player.startAnimation();
					}, 10);
				}, 2000);


				this.duifangpkgh = setInterval(function() {


					const parser = new Parser();
					// 实例化  svgn 动画 播放
					const player = new Player();
					player.loops = 1;
					setTimeout(async () => {

						await player.setCanvas('#duifangpk')
						var url = _this.maihuan
						const videoItem = await parser.load(url);
						await player.setVideoItem(videoItem);
						player.startAnimation();
					}, 10);
				}, 2300);




			},





			// 直播厅的时候点击  打开打赏礼物
			liwuxx: function() {

				this.qusuy(1)
				this.giftShow = true

			},



			// 关注房主

			ccgzjjk: function() {

				// return
				this.managerUserId


				console.log('关注')


				var _this = this
				var data = {
					url: '/web/v2/api/user/attentionUser',
					methods: 'post',
					data: {
						// userId:this.userId,
						toUserId: this.managerUserId
					}
				}
				this.$http(data).then(res => {
					if (res.data.code == 21000) {
						uni.showToast({
							title: '已关注~',
							icon: 'none'
						})

						_this.dqisAttention = 1
					} else { //接口请求失败的处理
						uni.showToast({
							title: res.data.msg,
							icon: 'none'
						})
					}
				})


			},


			// 取消关注房主,
			qxguanzhusss() {
				console.log('取消关注')
				var _this = this
				var data = {
					url: '/web/v2/api/user/noAttentionUser',
					methods: 'post',
					data: {
						// userId:this.userId,
						toUserId: this.managerUserId
					}
				}
				this.$http(data).then(res => {
					if (res.data.code == 21000) {
						uni.showToast({
							title: '已取消关注~',
							icon: 'none'
						})
						_this.dqisAttention = 2
					} else { //接口请求失败的处理
						uni.showToast({
							title: res.data.msg,
							icon: 'none'
						})
					}
				})
			},




			// 个人资料提示
			tiss: function() {
				uni.showToast({
					title: '下载哩咔APP查看',
					duration: 2000,
					icon: 'none'
				});
				return
			},

			tisss: function() {
				uni.showToast({
					title: '更多精彩请下载“哩咔”APP',
					duration: 2000,
					icon: 'none'
				});
				return
			},


			// 点击@它吊起键盘 并自动获取焦点
			graiteta: function() {
				console.log('@ta')
				// 自动获取焦点关闭
				this.focusState = false
				var nei = '@' + this.gerezilial.nickName

				this.mesgtext = nei
				this.gerenzl = false
				// 自动获取焦点
				this.$nextTick(function() {
					this.focusState = true;
				});


			},

			grguanzhu: function() {
				console.log('关注')
				// 关注
				this.guanzhu()


			},


			gryiguanzhu: function() {
				console.log('已经关注')
				// 取消关注
				this.qxguanzhu()
				// /user/attentionCancel
			},

			// 点击个人聊天
			grliaotian: function() {
				console.log('聊天')
				// 点击打开个人聊天页面
				var id = this.gerezilial.userId

				this.dakaisiliaoye(id)

			},
			grdashang: function() {
				console.log('打赏')
				this.gerenzl = false
				this.giftShow = true

			},

			// 本周礼物滑动
			handleScroll: function() {

			},




			// 底部打开个人资料半页弹窗
			grzl: function() {

				this.gerezilial = {}
				console.log('打开个人资料页面')

				this.giftShow = false
				var arr = this.maix;
				for (var i = 0; i < arr.length; i++) {
					console.log('第' + i + '个', arr[i].tye, '--------', arr[i].userId)
					if (arr[i].tye) {
						console.log(arr[i].userId)
						this.grenziluty(arr[i].userId)
					}
				}
				// 个人资料页
			},


			// 直播连麦的时候打开对方的个人资料

			dakaibanping: function() {

				this.gerezilial = {}
				this.pklist

				// this.gerenzl = true

				this.grenziluty(this.pklist.toUserId)

			},





			// 个人资料页查询/
			grenziluty: function(e) {

				var re = this.fangdou()

				if (!re) {
					console.log('不行')
					return

				}

				// 关闭贡献榜
				this.gongxianbang = false

				// 打开半屏资料
				this.gerenzl = true

				var _this = this

				_this.zongshul = 0
				var data = {
					url: '/web/v2/api/chatRoom/chatRoomUserInfo',
					methods: "post",
					data: {
						// toUserId
						toUserId: e
					}
				}
				this.$http(data).then((res) => {
					console.log('获取他', res)

					// 个人半屏资料页内容
					_this.gerezilial = res.data.data

					var rl = res.data.data.top3PhotoWall

					// 判断有没有照片 赋值给 点点...
					if (res.data.data.top3PhotoWall) {

						_this.dianguan = true
					} else {
						_this.dianguan = false
					}
					_this.gerenziliao

					var arr = res.data.data.thisWeekGiftList

					for (var i = 0; i < arr.length; i++) {
						_this.zongshul = parseInt(_this.zongshul + arr[i].totalSize);
						console.log('数量sss', _this.zongshul)
					}








				})
				// this.$forceUpdate()
			},
			// 个人关注按钮
			guanzhu() {
				console.log('点击关注')
				var _this = this
				var data = {
					url: '/web/v2/api/user/attentionUser',
					methods: 'post',
					data: {
						// userId:this.userId,
						toUserId: this.gerezilial.userId
					}
				}
				this.$http(data).then(res => {
					if (res.data.code == 21000) {
						uni.showToast({
							title: '已关注~',
							icon: 'none'
						})


						if (_this.gerezilial.userId == _this.managerUserId) {
							_this.dqisAttention = 1

						}
						_this.gerezilial.isAttention = 1




					} else { //接口请求失败的处理
						uni.showToast({
							title: res.data.msg,
							icon: 'none'
						})
					}
				})
			},


			// 取消关注

			qxguanzhu() {
				console.log('取消关注')
				var _this = this
				var data = {
					url: '/web/v2/api/user/noAttentionUser',
					methods: 'post',
					data: {
						// userId:this.userId,
						toUserId: this.gerezilial.userId
					}
				}
				this.$http(data).then(res => {
					if (res.data.code == 21000) {
						uni.showToast({
							title: '已取消关注~',
							icon: 'none'
						})


						if (_this.gerezilial.userId == _this.managerUserId) {
							_this.dqisAttention = 2
						}
						_this.gerezilial.isAttention = 2



					} else { //接口请求失败的处理
						uni.showToast({
							title: res.data.msg,
							icon: 'none'
						})
					}
				})
			},









			bangding: function() {

				var s = this.peopleDatalent * 50 + 110


				if (s < 400) {
					var s = s
				} else {
					var s = 400
				}

				this.maixchadu = s
			},




			//  在线列表局部刷新
			onPulling(e) {
				console.log("自定义下拉刷新控件被下拉", e);
			},
			onRefresh() {
				if (this._freshing) return;
				this._freshing = true;
				setTimeout(() => {
					this.triggered = false;
					this._freshing = false;
				}, 500)
				console.log('自定义下拉刷新被触发')
			},
			onRestore() {
				this.triggered = 'restore'; // 需要重置
				// 手动更新在线列表
				this.shuxizxlb()
				console.log("自定义下拉刷新被复位", '6666');
				// 更新在线列表

			},
			onAbort() {
				console.log("自定义下拉刷新被中止", '6565');

			},

			// 手动更新在线列表
			// this.getChatroomMembers()
			shuxizxlb: function() {

				this.zxlib = this.peopleData6
				console.log('在线列表', this.zxlib)
				console.log('原始在线列表', this.peopleData6)


			},





			// 播放动画音频
			bfdhyy: function(e) {
				// 声明 动画音频的 函数、
				var arr = e.split(".svga");
				console.log(arr, '播放礼物动画音频', e)
				var url = arr[0] + '.mp3'
				console.log(arr[0], '礼物音频地址', url)
				this.innerAudioContext.autoplay = true;
				// 赋值给动画的音频地址
				this.innerAudioContext.src = url;
				console.log('播放地址', this.DHurl)
				this.innerAudioContext.onPlay(() => {
					console.log('开始播放');
				});
				this.innerAudioContext.onError((res) => {
					// 播放错误
					console.log(res.errMsg, '播放错误');
					console.log(res.errCode, '播放错误1');
				});
				this.innerAudioContext.onPlay(() => {
					// 播放监听
					console.log('播放!');
					this.audioPlay = true;
				});
				this.innerAudioContext.onPause(() => {
					// 暂停监听
					console.log('暂停播放!');
					this.audioPlay = false
				});
				this.innerAudioContext.onEnded(() => {
					// 结束播放监听
					console.log('播放结束!');
					this.audioPlay = false;
				});
			},

			// 海报
			onsuccess(e) {
				console.log(e, "6666666666666666666666666666666666666666666666666666666666")
				this.haibaodizhi = e
			},

			// 保存图片

			saveImage() {

				this.haibaodizhi
				console.log(this.haibaodizhi,
					"this.haibaodizhithis.haibaodizhithis.haibaodizhithis.haibaodizhithis.haibaodizhi")

				this.saveShareImg(this.haibaodizhi)



			},



			// 保存到系统相册
			saveShareImg: function(canvasToTempFilePath) {
				let self = this;
				// 数据埋点点击保存海报
				self.saveId = '保存学情海报';
				// 获取用户是否开启用户授权相册
				if (!self.openStatus) {
					wx.openSetting({
						success: result => {
							if (result) {
								if (result.authSetting['scope.writePhotosAlbum'] === true) {
									self.openStatus = true;
									wx.saveImageToPhotosAlbum({
										filePath: canvasToTempFilePath,
										success() {
											self.showShareImg = false;
											wx.showToast({
												title: '图片保存成功，快去分享到朋友圈吧~',
												icon: 'none',
												duration: 2000
											});
										},
										fail() {
											wx.showToast({
												title: '保存失败',
												icon: 'none'
											});
										}
									});
								}
							}
						},
						fail: () => {},
						complete: () => {}
					});
				} else {
					wx.getSetting({
						success(res) {
							// 如果没有则获取授权
							if (!res.authSetting['scope.writePhotosAlbum']) {
								wx.authorize({
									scope: 'scope.writePhotosAlbum',
									success() {
										self.openStatus = true;
										wx.saveImageToPhotosAlbum({
											filePath: canvasToTempFilePath,
											success() {
												self.showShareImg = false;
												wx.showToast({
													title: '图片保存成功，快去分享到朋友圈吧~',
													icon: 'none',
													duration: 2000
												});
											},
											fail() {
												wx.showToast({
													title: '保存失败',
													icon: 'none'
												});
											}
										});
									},
									fail() {
										// 如果用户拒绝过或没有授权，则再次打开授权窗口
										self.openStatus = false;
										console.log('请设置允许访问相册');
										wx.showToast({
											title: '请设置允许访问相册',
											icon: 'none'
										});
									}
								});
							} else {
								// 有则直接保存
								self.openStatus = true;
								wx.saveImageToPhotosAlbum({
									filePath: canvasToTempFilePath,
									success() {
										self.showShareImg = false;
										wx.showToast({
											title: '图片保存成功，快去分享到朋友圈吧~',
											icon: 'none',
											duration: 2000
										});
									},
									fail() {
										wx.showToast({
											title: '保存失败',
											icon: 'none'
										});
									}
								});
							}
						},
						fail(err) {
							console.log(err);
						}
					});
				}

			},


			fangfa: function(e) {

				let _userInfo = uni.getStorageSync('userInfo');
				_userInfo.costLevel = e
				uni.setStorageSync('userInfo', _userInfo);
			},
			//易盾-反垃圾文本在线实时监测
			textCheck: function() {
				var that = this;
				//产品密钥ID，产品标识
				var secretId = "e6db3b1d64861ef947625fdd25a73eaf";
				// 产品私有密钥，服务端生成签名信息使用，请严格保管，避免泄露
				var secretKey = "96f67bfef4314e9e0b420ab605d84abe";
				// 业务ID，易盾根据产品业务特点分配
				var businessId = "1512b164103f420442e8f8f05a361a9d";
				// 易盾反垃圾云服务文本在线检测接口地址
				var apiurl = "https://as.dun.163.com/v3/text/check";
				//请求参数
				var post_data = {
					// 1.设置公有有参数
					secretId: secretId,
					businessId: businessId,
					version: "v3.1",
					timestamp: new Date().getTime(),
					nonce: noncer(),
					signatureMethod: "MD5", // MD5, SM3, SHA1, SHA256
					// 2.设置私有参数
					dataId: "ebfcad1c-dba1-490c-b4de-e784c2691768",
					content: that.mesgtext,

				};
				var signature = genSignature(secretKey, post_data);
				post_data.signature = signature;
				//http请求结果
				var data = {
					url: "https://as.dun.163.com/v3/text/check",
					methods: "post",
					data: post_data,
				};
				this.$http(data).then((responseData) => {
					var data = responseData.data;
					console.log("易盾返回结果==========================", data);
					var code = data.code;
					var msg = data.msg;

					// 发送聊天消息的时候先把vip更新

					if (code == 200) {
						var result = data.result;
						var taskId = result.taskId;
						var action = result.action;
						var labelArray = result.labels;
						if (labelArray.length > 0) {
							for (var i = 0; i < labelArray.length; i++) {}
						}
						if (action == 0) {
							console.log("taskId=" + taskId + "，文本机器检测结果：通过");
							var msg = chatroom.sendText({
								text: that.mesgtext,
								custom: JSON.stringify(that.fromCustom),
								done: sendChatroomMsgDone,
							});

							function sendChatroomMsgDone(error, msg) {
								var msgs = msg;
								that.mesgtext = "";
								console.log('dks', msgs)
								if (!error) {
									//显示用户发送文字和系统图片信息
									if (msgs.type == "text") {

										if (JSON.parse(msgs.custom).vip > 0) {

											that.vipnTxt =
												'<img class="vipNum" src="' +
												that.$BASE_URL +
												"/st/mini/static/img/vip1/vip_" +
												JSON.parse(msgs.custom).vip +
												'@2x.png"/>';
										} else {
											that.vipnTxt = "";
										}
										if (that.creator == msgs.from) {
											that.liaotianFn(
												that.vipnTxt +
												'<span style="color:#487bc9">[房主]</span>',
												msgs.fromNick,
												msgs.text
											);
										} else {
											that.liaotianFn(
												that.vipnTxt + '<span style="color:#487bc9"></span>',
												msgs.fromNick,
												msgs.text
											);
										}
									}
									that.$nextTick(function() {
										that.clickEvnet(1);
									});
								} else if (error.code == 13004) {
									uni.showToast({
										title: "你已被禁言",
										icon: "none",
										duration: 2000,
									});
								}
							}
						} else if (action == 1) {
							console.log(
								"taskId=" +
								taskId +
								"，文本机器检测结果：嫌疑，需人工复审，分类信息如下：" +
								JSON.stringify(labelArray)
							);
							that.liaotianFn(
								that.vipnTxt + '<span style="color:#487bc9"></span>',
								that.nickName,
								"***"
							);
							that.mesgtext = ""
						} else if (action == 2) {
							console.log(
								"taskId=" +
								taskId +
								"，文本机器检测结果：不通过，分类信息如下：" +
								JSON.stringify(labelArray)
							);
							that.liaotianFn(
								that.vipnTxt + '<span style="color:#487bc9"></span>',
								that.nickName,
								"***"
							);
							that.mesgtext = ""
						}
					} else {
						console.log("ERROR:code=" + code + ",msg=" + msg);
					}
				});
			},
			// 请求钻石数量
			Diamonds: function() {
				var that = this
				var data = {
					url: '/web/v2/api/user/currentIncome',
					methods: 'post',
					data: {

					}
				}
				this.$http(data).then(res => {
					console.log(res, " 钻石 金币 数量")
					// 钻石数量
					that.diamond = res.data.data.diamond
					// 金币数量
					that.score = res.data.data.score
				})
			},


			// 关闭礼物弹窗初始化
			close() {

				data2 = []
				this.num = 1
				this.zengsongShow = !this.zengsongShow
				if (this.giftShow1) {
					this.giftShow1 = false
				}
				if (!this.zengsongShow) {
					this.peopleData3 = []
					this.peopleData4 = []
					// this.getChatroomMembers()
				}

				// console.log(this.peopleData4)
				this.peopleData3 = [].concat(this.peopleData4);
				this.peopleData3 = this.peopleData4
				this.peopleData3.map((val, key) => {
					this.getSelectArea(val.seat)
				})
			},
			// 获取麦克风授权
			getSetting() {
				var that = this



				uni.getSetting({
					success(res) {
						console.log("麦克风权限=============", res)
						// res.authSetting['scope.record']==false语音麦克风没有权限
						if (res.authSetting['scope.record'] == false) {
							// 开启麦克风权限（直接调用不可以，需要弹窗）
							console.log("麦克风关闭=============", that)
							// that.mkShow = true

							uni.showModal({
								title: '温馨提示',
								content: '麦克风未开启',
								confirmText: '去授权',
								cancelText: '拒绝授权',
								success: function(res) {
									if (res.confirm) {
										console.log('用户点击了去授权');
										that.openSetting()
									} else if (res.cancel) {
										console.log('用户点击了拒绝授权');
									}
								}
							});
							console.log('开启弹窗')

							that.client.muteLocal("audio", function() {
								console.log("麦克风推流停止")
							})
						} else {
							console.log("麦克风开启============111=", that.client)
							that.client.unmuteLocal("audio", function() {
								console.log("麦克风推流开始")
							})
							console.log('关闭弹窗')
							that.mkShow = false
						}

					}
				})

			},



			maikes: function(e) {
				console.log(e)
				var that = this
				// e=1的时候是 点击麦克风 需要禁麦
				// e=2 的时候 点击关闭麦克风， 需要开启推流
				// 图标禁麦
				if (e == 1) {
					that.maike = true
					console.log("麦克风推流停止")
					// 停止推流的时候把自己的 位置推送到 禁止数组里 限制声波、


					var uid = uni.getStorageSync("userInfo").identityId
					var _this = this
					_this.chatData

					_this.guolvxiabiao.push(uid)





					that.client.muteLocal("audio", function() {
						console.log("麦克风推流停止")
					})
					// 改变身份状态



				}

				if (e == 2) {

					that.maike = false

					console.log("麦克风推流开始")


					var uid = uni.getStorageSync("userInfo").identityId



					var _this = this

					// 删除禁麦id
					_this.yschsl(uid)

					console.log('恢复执行发送音频流', _this.chatData)

					// for (var i = 0; i < _this.chatData.length; i++) {
					// 	if (uid == _this.chatData[i].aguid) {
					// 		for (var a = 0; a < _this.guolvxiabiao.length; a++) {
					// 			if (i == _this.guolvxiabiao[a]) {
					// 				console.log(i, '恢复执行发送音频流')
					// 				_this.guolvxiabiao.splice(a, 1)
					// 			}

					// 		}
					// 		console.log('确定删除ID', i)
					// 	}
					// }

					// 开始推流的时候把自己的 位置从 禁止数组里删除 解除限制声波
					that.client.unmuteLocal("audio", function() {
						console.log("麦克风推流开始")

					})
				}
			},


			downs(url) {

				var that = this;

				uni.downloadFile({
					//下载
					url: url, //图片下载地址
					success: (res) => {
						console.log("图片下载的返回", res)
						if (res.statusCode === 200) {
							uni.saveImageToPhotosAlbum({
								//保存图片到系统相册。
								filePath: res.tempFilePath, //图片文件路径
								success: function() {
									that.shareShow = false;
									that.shareShow1 = false;
									uni.showToast({
										title: "图片保存成功",
										icon: "none",
									});

									that.tuanchuangnecz('关注公众号充值弹窗', '关注公众号充值弹窗保存')

									// // #ifdef  MP-WEIXIN

									// // PopUpClick	弹窗内点击		$预置属性		
									// // 		$is_first_time	是否首次	BOOL	
									// // 		button_name	按钮名称	STRING	引导下载APP海报弹窗复制链接/引导下载APP海报弹窗点击下载/下载APP弹窗取消/下载APP弹窗一键复制/关注公众号充值弹窗保存
									// // 		PopUp_name	弹窗名称	STRING	引导下载APP海报弹窗/下载APP弹窗/关注公众号充值弹窗
									// // 		current_page	当前页面	STRING	交友tab/一对一消息/厅内/我tab
									// // 		room_id	房间ID	STRING	
									// getApp().sensors.track('PopUpClick', {
									// 	$is_first_time: uni.getStorageSync("shifoushouci") == 2 ? 'false' : 'true',
									// 	PopUp_name: '关注公众号充值弹窗',
									// 	button_name: '关注公众号充值弹窗保存',
									// 	current_page: '厅内',
									// 	room_id:this.roomId,
									// })
									// // #endif
								},
								fail: function(e) {
									that.shareShow = false;
									that.shareShow1 = false;
									uni.showToast({
										title: "图片保存失败",
										icon: "none",
									});
								},
							});
						}
					},
				});
			},




			// 开启麦克风权限
			openSetting() {
				uni.openSetting({
					success: (res) => {
						console.log('怎么没打印' + res);
						// if(res.authSetting['scope.record']==false){
						//   that.showModalVisible = true
						// }
					}
				})
			},
			check() {
				console.log(1111)
				uni.request({
					url: 'https://as.dun.163.com/v4/text/check',
					data: {
						businessId: '1512b164103f420442e8f8f05a361a9d',
						dataId: '123',
						content: '123',
						version: 'v4.2'
					},
					success: (res) => {
						console.log(res.data);
						this.text = 'request success';
					},
					fail: (error) => {
						console.log(res.data);
						this.text = 'request error';
					}
				});
			},

			// 拼接cavasa id
			pinjieid: function(e) {


				return 'shengbos' + e

			},




			// 声波光环

			shengbozhixing: function() {
				for (var i = 0; i < this.chatData.length; i++) {
					var userid = this.chatData[i].userId



					if (i == 0) {

						this.linghao();
					} else if (i == 1) {

						this.yihao();
					} else if (i == 2) {

						this.erhao();
					} else if (i == 3) {

						this.sanhao();
					} else if (i == 4) {

						this.sihao();
					} else if (i == 5) {

						this.wuhao();
					} else if (i == 6) {

						this.liuhao();
					} else if (i == 7) {

						this.qihao();
					}
				}



				// setTimeout(function() {

				// 	// 停止播放
				// 	player.stopAnimation()
				// }, 5000)



			},




			// 判断对象长度
			panduandui: function(e) {


				var num = 0;

				//假设obj是一个对象数组
				var obj = this.chatData[e];

				for (var i in obj) {

					num++;

				}

				return num;

			},


			// 分开生成各麦位 声波标准

			linghao: function(e) {

				console.log(e, "eeeeeeeeeeee")
				// 实例化  svgn动画

				var _this = this

				this.timera = setInterval(function() {
					console.log('执行波环0号')
					var si = _this.panduandui(0)
					console.log(si, "si")
					if (si == 11) {

						var id = _this.chatData[0].aguid
						console.log(si, "si", id)
						// 判断当前麦位id 是否存在于 云信返回的禁麦数组里

						for (var i = 0; i < _this.guolvxiabiao.length; i++) {
							if (id == _this.guolvxiabiao[i]) {
								return
							}

						}

						const parser = new Parser();
						// 实例化  svgn 动画 播放
						const player = new Player();
						player.loops = 1;
						setTimeout(async () => {
							// 实例化 canvas
							await player.setCanvas('#shengbos0')
							console.log('实例化声波动画')
							// var url = this.$global.getImageUrl('animate/guard3.svga')
							var url = _this.maihuan
							// "https://webapp.test.shenghua6.cn/st/mini/static/img/gender/guardian.svga"

							const videoItem = await parser.load(url);
							console.log('videoItem礼物videoItem', videoItem)
							await player.setVideoItem(videoItem);

							console.log('开始动画')
							console.log('player555555', player)
							player.startAnimation();

							// setTimeout(function() {
							// 	// 停止播放
							// 	player.stopAnimation()
							// }, 3000)



						}, 50);




					}



				}, 2000);





			},

			yihao: function(e) {


				// 实例化  svgn动画

				var _this = this

				this.timerb = setInterval(function() {

					var si = _this.panduandui(1)


					if (si == 11) {
						var id = _this.chatData[1].aguid
						console.log('执行波环1号')
						for (var i = 0; i < _this.guolvxiabiao.length; i++) {
							if (id == _this.guolvxiabiao[i]) {
								return
							}
						}

						const parser = new Parser();
						// 实例化  svgn 动画 播放
						const player = new Player();

						player.loops = 1;
						setTimeout(async () => {
							// 实例化 canvas
							await player.setCanvas('#shengbos1')
							console.log('实例化声波动画')
							// var url = this.$global.getImageUrl('animate/guard3.svga')
							var url = _this.maihuan
							// "https://webapp.test.shenghua6.cn/st/mini/static/img/gender/guardian.svga"
							const videoItem = await parser.load(url);
							console.log('videoItem礼物videoItem', videoItem)
							await player.setVideoItem(videoItem);
							console.log('开始动画')
							console.log('player555555', player)
							player.startAnimation();
							// setTimeout(function() {
							// 	// 停止播放
							// 	player.stopAnimation()
							// }, 3000)
						}, 50);


					}
				}, 2000);
			},
			erhao: function() {
				// 实例化  svgn动画
				var _this = this
				this.timerc = setInterval(function() {

					var si = _this.panduandui(2)

					if (si == 11) {
						var id = _this.chatData[2].aguid
						console.log('执行波环2号')
						for (var i = 0; i < _this.guolvxiabiao.length; i++) {
							if (id == _this.guolvxiabiao[i]) {
								return
							}
						}
					}
					const parser = new Parser();
					// 实例化  svgn 动画 播放
					const player = new Player();

					player.loops = 1;
					setTimeout(async () => {
						// 实例化 canvas
						await player.setCanvas('#shengbos2')
						console.log('实例化声波动画')
						// var url = this.$global.getImageUrl('animate/guard3.svga')
						var url = _this.maihuan
						// "https://webapp.test.shenghua6.cn/st/mini/static/img/gender/guardian.svga"

						const videoItem = await parser.load(url);
						console.log('videoItem礼物videoItem', videoItem)
						await player.setVideoItem(videoItem);

						console.log('开始动画')
						console.log('player555555', player)
						player.startAnimation();

						// setTimeout(function() {
						// 	// 停止播放
						// 	player.stopAnimation()
						// }, 3000)



					}, 50);







				}, 2000);

			},

			sanhao: function() {

				// 实例化  svgn动画

				var _this = this

				this.timerd = setInterval(function() {





					var si = _this.panduandui(3)

					if (si == 11) {
						var id = _this.chatData[3].aguid
						console.log('执行波环3号')

						for (var i = 0; i < _this.guolvxiabiao.length; i++) {
							if (id == _this.guolvxiabiao[i]) {
								return
							}
						}
						const parser = new Parser();
						// 实例化  svgn 动画 播放
						const player = new Player();

						player.loops = 1;
						setTimeout(async () => {
							// 实例化 canvas
							await player.setCanvas('#shengbos3')
							console.log('实例化声波动画')
							// var url = this.$global.getImageUrl('animate/guard3.svga')
							var url = _this.maihuan
							// "https://webapp.test.shenghua6.cn/st/mini/static/img/gender/guardian.svga"

							const videoItem = await parser.load(url);
							console.log('videoItem礼物videoItem', videoItem)
							await player.setVideoItem(videoItem);

							console.log('开始动画')
							console.log('player555555', player)
							player.startAnimation();

							// setTimeout(function() {
							// 	// 停止播放
							// 	player.stopAnimation()
							// }, 3000)



						}, 50);





					}





				}, 2000);


			},
			sihao: function() {
				// 实例化  svgn动画

				var _this = this

				this.timere = setInterval(function() {





					var si = _this.panduandui(4)

					if (si == 11) {
						var id = _this.chatData[4].aguid
						console.log('执行波环4号')
						for (var i = 0; i < _this.guolvxiabiao.length; i++) {
							if (id == _this.guolvxiabiao[i]) {
								return
							} }
								const parser = new Parser();
								// 实例化  svgn 动画 播放
								const player = new Player();

								player.loops = 1;
								setTimeout(async () => {
									// 实例化 canvas
									await player.setCanvas('#shengbos4')
									console.log('实例化声波动画')
									// var url = this.$global.getImageUrl('animate/guard3.svga')
									var url = _this.maihuan
									// "https://webapp.test.shenghua6.cn/st/mini/static/img/gender/guardian.svga"

									const videoItem = await parser.load(url);
									console.log('videoItem礼物videoItem', videoItem)
									await player.setVideoItem(videoItem);

									console.log('开始动画')
									console.log('player555555', player)
									player.startAnimation();

									// setTimeout(function() {
									// 	// 停止播放
									// 	player.stopAnimation()
									// }, 3000)



								}, 50);



						

					}





				}, 2000);

			},
			wuhao: function() {
				// 实例化  svgn动画

				var _this = this

				this.timerf = setInterval(function() {




					var si = _this.panduandui(5)

					if (si == 11) {
						var id = _this.chatData[5].aguid
						console.log('执行波环5号')
						for (var i = 0; i < _this.guolvxiabiao.length; i++) {
							if (id == _this.guolvxiabiao[i]) {
								return
							} }


								const parser = new Parser();
								// 实例化  svgn 动画 播放
								const player = new Player();

								player.loops = 1;
								setTimeout(async () => {
									// 实例化 canvas
									await player.setCanvas('#shengbos5')
									console.log('实例化声波动画')
									// var url = this.$global.getImageUrl('animate/guard3.svga')
									var url = _this.maihuan
									// "https://webapp.test.shenghua6.cn/st/mini/static/img/gender/guardian.svga"

									const videoItem = await parser.load(url);
									console.log('videoItem礼物videoItem', videoItem)
									await player.setVideoItem(videoItem);

									console.log('开始动画')
									console.log('player555555', player)
									player.startAnimation();

									// setTimeout(function() {
									// 	// 停止播放
									// 	player.stopAnimation()
									// }, 3000)



								}, 50);

							}
					




				}, 2000);

			},
			liuhao: function() {
				// 实例化  svgn动画

				var _this = this

				this.timerg = setInterval(function() {




					var si = _this.panduandui(6)

					if (si == 11) {
						var id = _this.chatData[6].aguid
						console.log('执行波环6号')
						for (var i = 0; i < _this.guolvxiabiao.length; i++) {
							if (id == _this.guolvxiabiao[i]) {
								return
							} }


								const parser = new Parser();
								// 实例化  svgn 动画 播放
								const player = new Player();
								player.loops = 1;
								setTimeout(async () => {
									// 实例化 canvas
									await player.setCanvas('#shengbos6')
									console.log('实例化声波动画')
									// var url = this.$global.getImageUrl('animate/guard3.svga')
									var url = _this.maihuan
									// "https://webapp.test.shenghua6.cn/st/mini/static/img/gender/guardian.svga"

									const videoItem = await parser.load(url);
									console.log('videoItem礼物videoItem', videoItem)
									await player.setVideoItem(videoItem);
									console.log('开始动画')
									console.log('player555555', player)
									player.startAnimation();
									// setTimeout(function() {
									// 	// 停止播放
									// 	player.stopAnimation()
									// }, 3000)
								}, 50);

							}
					



				}, 2000);

			},
			qihao: function() {
				// 实例化  svgn动画
				return

				var _this = this

				setInterval(function() {


					var si = _this.panduandui(7)

					if (si == 11) {
						var id = _this.chatData[7].aguid
						console.log('执行波环7号')
						for (var i = 0; i < _this.guolvxiabiao.length; i++) {
							if (id == _this.guolvxiabiao[i]) {
								return
							} }

								const parser = new Parser();
								// 实例化  svgn 动画 播放
								const player = new Player();

								player.loops = 1;
								setTimeout(async () => {
									// 实例化 canvas
									await player.setCanvas('#shengbos7')
									console.log('实例化声波动画')
									// var url = this.$global.getImageUrl('animate/guard3.svga')
									var url = _this.maihuan
									// "https://webapp.test.shenghua6.cn/st/mini/static/img/gender/guardian.svga"
									const videoItem = await parser.load(url);
									console.log('videoItem礼物videoItem', videoItem)
									await player.setVideoItem(videoItem);
									console.log('开始动画')
									console.log('player555555', player)
									player.startAnimation();
									// setTimeout(function() {
									// 	// 停止播放
									// 	player.stopAnimation()
									// }, 3000)



								}, 50);

							}
					



				}, 2000);

			},


			// 礼物特效
			loadSvga() {
				// return
				var that = this;
				console.log('执行礼物特效1')
				that.Height = that.clientHeight
				console.log('that.Height礼物', that.Height)
				console.log('that.clientHeight礼物', that.clientHeight)
				console.log('执行礼物特效2')
				// 控制动画播放数组 false 不可添加
				that.show = false;
				// 实例化  svgn动画
				const parser = new Parser();
				// 实例化  svgn 动画 播放
				const player = new Player();
				// 循环次数
				player.loops = 1;
				setTimeout(async () => {
					console.log(this.i, "礼物播放第几个动画")
					// 实例化 canvas
					await player.setCanvas("#demoCanvas")
					console.log('礼物实例化canvas')
					const videoItem = await parser.load(animationUrlData[this.i]);
					// 播放音频
					that.bfdhyy(animationUrlData[this.i])
					console.log('6')
					console.log('videoItem礼物videoItem', videoItem)
					await player.setVideoItem(videoItem);
					// 开始动画
					player.startAnimation();
					// 监听动画完成
					player.onFinished(function() {
						console.log('是礼物播放结束完成')
						that.i++;
						console.log(that.i, "i***+礼物+++", '礼物数组长度', animationUrlData
							.length)
						if (that.i < animationUrlData.length) {
							console.log('判断')
							that.loadSvga();
							// that.Height = 0
							console.log(that.i, "把动画底座礼物清空that.Height", that.Height)
						} else {
							console.log(that.i, "把动画底座礼物清空")
							that.Height = 0
							that.i = 0;
							that.show = true;
							animationUrlData = [];
							console.log(that.i, "把动画底座礼物清空that.Height", that.Height, "")
							return;
						}
					});
				}, 600);
			},




			// 礼物跟随特效


			gensui: function() {
				var _this = this
				if (_this.pnglist.length > 0) {

					setTimeout(function() {
						var img = _this.pnglist[0].img
						var idx = _this.pnglist[0].idx


						if (idx == undefined) {
							return
						}

						_this.dguziigagfa(img, idx)
					}, 2000)


				}






				// for (var i = 0; i < arr.length; i++) {
				// 	(function(t, data) { // 注意这里是形参
				// 		setTimeout(function() {
				// 			console.log(`这是第 ${t} 次，这是其他参数：${data}`,'删除');
				// 			var img = _this.pnglist[t].img
				// 			var idx = _this.pnglist[t].idx
				// 			// var img = 'https://ourydcimage.shenghua6.cn/giftImage/gift/1_52100_8.png' 
				// 			// var idx = 7
				// 			// _this.dguziigagfa(img, idx)
				// 			// console.log(_this.pnglist,"删除前")
				// 			// _this.pnglist.splice(0, 1);
				// 			// console.log(_this.pnglist,"删除后")
				// 		}, 2000 * t); // 还是每秒执行一次，不是累加的
				// 	})(i, '其他参数') // 注意这里是实参，这里把要用的参数传进去
				// }



			},
			dguziigagfa: function(img, idx) {

				console.log(img, idx, "66666666666666")

				this.gensuipng = img

				if (idx == 0) {
					var X = -170
					var Y = -460
				} else if (idx == 1) {
					var X = -180
					var Y = -320
				} else if (idx == 2) {
					var X = -60
					var Y = -320
				} else if (idx == 3) {
					var X = 60
					var Y = -320
				} else if (idx == 4) {
					var X = 180
					var Y = -320
				} else if (idx == 5) {
					var X = -180
					var Y = -220
				} else if (idx == 6) {
					var X = -60
					var Y = -220
				} else if (idx == 7) {
					var X = 60
					var Y = -220
				} else if (idx == 8) {
					var X = 180
					var Y = -220
				}
				var animation = uni.createAnimation({
					duration: 1000,
					timingFunction: 'ease',
				})
				var s = 350 + Number(Math.random() * 10)
				this.animation.opacity(1).translateY(s).scale(1.8, 1.8).step({
					duration: 800
				})
				// translateZ
				// this.animation.translateZ(500).step({duration:1000})
				this.animation.translate(X, Y).scale(0.8, 0.8).opacity(0).step({
					duration: 1000
				})
				this.animationData = this.animation.export()
				var _this = this
				setTimeout(() => {
					_this.reset()
				}, 1900);

			},




			// 动画还原
			reset: function() {

				this.animation.rotate(0, 0)
					.scale(1).translateY(0)
					.translate(0, 0)
					.skew(0, 0)
					.step({
						duration: 0
					})
				this.animationData = this.animation.export()
				this.pnglist.splice(0, 1)
				console.log("跟随动画数组长度", this.pnglist)

				this.gensui()

			},


			// 取所有麦上用户

			qusuy: function(e) {
				// 携带参数过来的时候 是点击礼物开关进来的时候
				if (e == 1) {
					this.maix = []
					// 麦上列表
					let arr = this.chatData;
					console.log('礼物弹窗res', arr)
					arr.forEach((value, index) => {
						value['tye'] = 'true'
					})
					// 全麦选中状态
					this.quanmai = true


					// 赠送状态
					this.zengsong = true
					for (var i = 0; i < arr.length; i++) {
						console.log(arr[i])
						if (arr[i].userId) {
							console.log('第几有', i)
							this.maix.push(arr[i])
						}
					}

					var data = {
						headImg: this.ufztx,
						userId: this.uids,
						seat: 0,
						tye: true
					}
					console.log(data, 'fangzhu')
					console.log('礼物弹窗res房主', data)
					this.maix.unshift(data)

				}

				this.qxqm()

			},

			// 点击改变单个选中状态
			getSelectArea: function(val) {
				for (var i = 0; i < this.maix.length; i++) {
					console.log(i)
					if (this.maix[i].seat == val) {
						var s = this.maix[i].tye
						this.maix[i].tye = !s
						// 强制更新
						this.$forceUpdate()
					}
				}

				this.qxqm();

			},
			// 查询全麦列表状态赋值
			qxqm: function() {

				// 有几个选中状态清空
				this.ziliaos = [];
				var arr = this.maix;
				//  方法1：利用对象访问属性的方法，判断对象中是否存在key
				var result = [];
				var obj = {};

				for (var i = 0; i < arr.length; i++) {
					if (!obj[arr[i].tye]) {
						result.push(arr[i]);
						obj[arr[i].tye] = true;
					}
				}
				console.log(result);


				// 数组去重,来判断 给全麦 赠送 按钮赋值
				// result 数量为1的时候判断 	

				if (result.length == 1) {
					if (result[0].tye) {
						// 全选按钮开
						this.quanmai = true
						// 赠送按钮开
						this.zengsong = true
					} else {
						// 全选按钮关,
						this.quanmai = false
						// 赠送按钮关,
						this.zengsong = false
					}
				} else if (result.length == 2) {
					// 全选按钮关闭
					this.quanmai = false
					// 赠送按钮开
					this.zengsong = true
				}



				// 判断有几个选中的 如果有一个的话打开资料按钮
				for (var i = 0; i < arr.length; i++) {
					var s = arr[i].tye
					if (s) {
						this.ziliaos.push(s)
					}


				}
				// 如果只有后一个选中状态 展示资料按钮
				if (this.ziliaos.length == 1) {

					this.ziliao = true
				} else {
					this.ziliao = false
				}
				console.log(this.ziliaos, "按钮是否展示")


			},
			// 打赏给自己
			sendMine(e) {


				if (e == 1) {
					var s = 0
				} else {
					var s = this.zjindx
				}


				console.log('打上给自己或者一个人', s)
				var that = this
				// 打开礼物弹窗
				that.giftShowChange()

				// this.giftShow1 = true

				// 点击打赏自己 获得自己的麦位 
				// 判断把自己头像改成选中状态, 除了自己外都改成false				
				for (var i = 0; i < that.maix.length; i++) {
					if (that.maix[i].seat == s) {
						that.maix[i].tye = true
					} else {
						that.maix[i].tye = false
					}
				}
				// 全麦 赠送按钮状态
				this.qxqm()
			},
			// 全买按钮
			allchange() {

				//  赠送按钮
				// this.zengsong = !this.zengsong
				// this.quanmai = !this.quanmai
				var that = this
				var arr = this.maix;
				//  方法1：利用对象访问属性的方法，判断对象中是否存在key
				var result = [];
				var obj = {};

				for (var i = 0; i < arr.length; i++) {
					if (!obj[arr[i].tye]) {
						result.push(arr[i]);
						obj[arr[i].tye] = true;
					}
				}

				console.log(result, '3636');

				if (result.length == 2) {
					that.quanmai = true
					for (var i = 0; i < that.maix.length; i++) {
						that.maix[i].tye = true
					}

				} else {
					if (result[0].tye == true) {
						that.quanmai = !that.quanmai

						// 礼物下标



						if (that.isIndex1 >= 0) {
							that.zengsong = false
						}


						for (var i = 0; i < that.maix.length; i++) {
							that.maix[i].tye = false
						}
					} else {
						that.quanmai = !that.quanmai
						that.zengsong = true
						// that.zengsong = !that.zengsong
						for (var i = 0; i < that.maix.length; i++) {
							that.maix[i].tye = true
						}

					}
				}


				// if (this.zengsong) {
				// 	// 改变所有的状态为选中
				// 	for (var i = 0; i < that.maix.length; i++) {
				// 		that.maix[i].tye = true
				// 	}
				// } else {
				// 	// 改变所有的状态为选中
				// 	for (var i = 0; i < that.maix.length; i++) {
				// 		that.maix[i].tye = false
				// 	}
				// }
				this.qxqm()
			},
			// 获取svag的 麦上波环图片
			fangshis: function() {

				var data = {
					url: '/web/v2/api/config/animationList',
					methods: "post",
					data: {
						giftUpdateVersionTime: 0
					}
				}

				// 
				this.$http(data).then((res) => {

					console.log('获取队列', res)


				})

			},


			// 网易云信初始化
			roomFn() {




				console.log('开始加载长连接完成数据')
				var that = this
				// IM配置扩展-添加系统通知
				// this.$NIM.setOptions({
				//                 oncustomsysmsg: onCustomSysMsg,
				//             });
				// 收到自定义系统通知的回调, 会传入系统通知

				function onCustomSysMsg(sysMsg) {
					console.log("收到自定义系统通知", sysMsg);
					if (JSON.parse(sysMsg.content).command == 8) {
						that.client.muteLocal("audio", function() {
							console.log("麦克风推流停止")
						})
					} else if (JSON.parse(sysMsg.content).command == 9) {
						that.client.unmuteLocal("audio", function() {
							console.log("麦克风推流开始")
						})
					}

				}
				console.log('111', this.chatRoomAddress)
				//聊天室实例初始化
				chatroom = SDK.Chatroom.getInstance({
					appKey: '7ca5cef23fd00cb4774107175ab6d413',
					// account: '0002018040818225188000',
					// token: 'DN20180408eypg',
					account: this.userId,
					token: decrypt(this.token),
					chatroomId: this.roomId,
					chatroomAddresses: [
						this.chatRoomAddress
					],

					chatroomEnterCustom: JSON.stringify(this.chatroomEnterCustom),
					chatroomCustom: JSON.stringify(this.fromCustom),
					onconnect: onChatroomConnect,
					onerror: onChatroomError,
					onwillreconnect: onChatroomWillReconnect,
					ondisconnect: onChatroomDisconnect,
					// 消息
					onmsgs: onChatroomMsgs,
				});




				function onChatroomConnect(obj) {

					// 再 次重连接  应当先 
					// 声网重新初始化
					// 声音初始化
					that.client.destroy()
					that.syint()



					console.log('进入聊天室111', obj)
					that.url = obj.chatroom.broadcastUrl
					// 该处chatroom为全局生成的实例
					//获取聊天室信息
					chatroom.getChatroom({
						done: getChatroomDone
					});

					function getChatroomDone(error, obj) {
						console.log('获取聊天室信息11166', error, obj)

						var chat_room_num1
						if (obj.chatroom.custom == "") {
							chat_room_num1 = 0
						} else {
							chat_room_num1 = JSON.parse(obj.chatroom.custom).chat_room_num1; //钻石数量
						}
						// 贡献值赋值
						that.zsNum = parseInt(chat_room_num1)
						if (!error) {
							that.creator = obj.chatroom.creator
						}
						console.log('获取聊天室信息111' + (!error ? '成功' : '失败'), error, obj);
					}
					//进入聊天室队列中获取列表
					chatroom.queueList({
						done(err, obj, content) {
							console.log('队列12', content)
							if (err) {
								console.error(err)
							}
							console.log('获取队列', '初始化上麦信息', err, obj, content)

							// 获取麦上波环
							that.fangshis()

							//初始化上麦信息

							that.shangmaiFn(obj)

							if (content && content.queueList) {
								that.queueCount = 0
								for (let i = 0; i < content.queueList.length; i++) {
									let queue = content.queueList[i]


									// 房间热度值/*  */
									if (queue.heat) {
										that.onLineUser = queue.heat
									}
									// pk状态下的 pk值
									if (queue.pkLiveNum) {
										var s = JSON.parse(queue.pkLiveNum)
										that.toContribut = s.toContribut
										that.fromContribut = s.fromContribut
										var z = s.fromContribut + s.toContribut
										if (z == 0) {
											// 50 %
											var k = '50%'
										} else {
											var d = s.fromContribut / z
											if (d > 0.9) {
												var d = 0.7
											}

											if (d < 0.1) {
												var d = 0.3
											}
											var k = d * 100 + '%'
										}
										console.log('pk值变化', k)
										that.pressWidth = k
									}
									// pk 下的位置队列
									if (queue.pkLiveContribution) {
										var s = JSON.parse(queue.pkLiveContribution)
										that.fromList = s.fromList
										that.toList = s.toList
										for (let i = s.toList.length; i < 4; i++) {
											that.toList.push({})
										}

									}


									// pk结果 倒计时  pk状态

									if (queue.pkLiveStatus) {

										var s = JSON.parse(queue.pkLiveStatus)
										that.pklist = s
										console.log('that.pklist', that.pklist)



										if (s.status == 4) {

											that.kqpk = true

											// 开启声波光环
											that.zhibopkbohuan()


											that.pktime = setInterval(function() {

												// 倒计时
												that.countdown();
											}, 1000);
										}


										if (s.status == 5) {

											that.kqpk = true

											// 开启声波光环
											that.zhibopkbohuan()


											that.pktime = setInterval(function() {

												// 倒计时
												that.countdown();
											}, 1000);

											console.log('pk惩罚时间', s)


											// 判断胜负   1 房主胜利  2 对方胜利  3平局

											if (s.winUserId == that.managerUserId) {
												that.pkresult = 1
											} else if (s.winUserId == s.toUserId) {
												that.pkresult = 2

											}

										} else if (s.status == 6) {
											console.log('pk平局', s)
											that.pkresult = 3

										}


										if (s.status == 0) {
											that.kqpk = false


											// 直播pk麦上波环
											clearTimeout(that.wofangpkgh);

											clearTimeout(that.duifangpkgh);

											// 直播倒计时
											clearTimeout(that.zbghs);

											that.pkresult = 0
										}



									}


								}
							}
						}
					})
					// 连接成功后才可以发消息
					// var msg = chatroom.sendText({
					// 	text: that.nickName + '进入聊天室，欢迎~',
					// 	done: function sendChatroomMsgDone(msgObj) {}
					// })zaixianliebiao
					// 更新名片
					chatroom.updateMyChatroomMemberInfo({
						member: {

							nick: that.nickName,
							gender: 'male',
							avatar: that.$global.getImageUrl(
								that.headImg,
								"https://ourydcimage.shenghua6.cn"
							),
							custom: JSON.stringify(that.fromCustom),
						},
						needNotify: true,
						custom: JSON.stringify(that.fromCustom),
						done: updateMyChatroomMemberInfoDone
					})

					function updateMyChatroomMemberInfoDone(error, obj) {

						console.log('更新自己在聊天室内的信息' + (!error ? '成功' : '失败'), error, obj);
					}
				}

				function onChatroomWillReconnect(obj) {
					console.log('即将重连666666666', obj);
					// 清空上麦列表
					// that.chatData = []

					// 清空 麦下列表
					// that.peopleData = []
					// 此时说明 `SDK` 已经断开连接, 请开发者在界面上提示用户连接已断开, 而且正在重新建立连接


					uni.showToast({
						title: '请检查网络链接',
						duration: 2000,
						icon: 'none',
					});



				}

				function onChatroomDisconnect(error) {
					// 此时说明 `SDK` 处于断开状态, 开发者此时应该根据错误码提示相应的错误信息, 并且跳转到登录页面
					console.log('连接断开', error);
					// that.liveOver = true
					// that.message = error.message

					if (error) {
						// this.animationUrlData = []
						// chatroom.disconnect()
						// that.client.leave();

						// // 当前用户下麦
						// that.offSeat()

						switch (error.code) {
							// 账号或者密码错误, 请跳转到登录页面并提示错误
							case 302:
								break;
								// 被踢, 请提示错误后跳转到登录页面
							case 'kicked':

								if (error.reason == 'chatroomClosed') {
									console.log('6666')
									uni.showToast({
										title: '当前聊天室已经关闭啦~',
										duration: 2000,
										icon: 'none',
									});
									setTimeout(function() {
										uni.navigateBack();
									}, 2000);

								} else if (error.reason == 'managerKick') {
									uni.showToast({
										title: '您已被踢出当前房间',
										duration: 2000,
										icon: 'none',
									});

									setTimeout(function() {
										var data = {
											url: '/web/v2/api/newApi/chatRoom/outChatRoom',
											methods: 'post',
											data: {
												roomId: that.roomId,
												isKickOut: 1
											}
										}
										that.$http(data).then(res => {
											if (res.data.code == 21000) {
												uni.navigateBack();
											}
										})
									}, 2000);

								} else if (error.reason == 'samePlatformKick') {
									uni.showToast({
										title: '你已在其他地方登陆,请重新登陆',
										duration: 2000,
										icon: 'none',
									});
									setTimeout(function() {
										uni.redirectTo({
											url: '/pages/login/wxlogin'
										})
									}, 2000);

								} else if (error.reason == 'managerKick') {

									uni.showToast({
										title: "您的帐号已被封禁",
										duration: 2000,
										icon: "none",
									});
									setTimeout(function() {


										// 清空本地消息缓存
										getApp().globalData = {
											sessions: [],
											set: 1,
											huihua: []
										}

										//清除本地登录状态
										// uni.clearStorage();
										
										// 清除本地cookie
										uni.removeStorage({key: 'cookie'});
										
										//IM实例销毁
										Vue.prototype.$NIM.disconnect();
										//跳转登录页
										uni.redirectTo({
											url: "/pages/login/wxlogin",
										});
									}, 2000);

								}
								break;
							default:
								break;
						}
					}
				}

				function onChatroomError(error, obj) {
					// that.chatData = []

					console.log('发生错误', error, obj);
				}
				// 收到聊天室消息
				function onChatroomMsgs(msgs) {


					console.log('收到聊天室消息', msgs)


					// 更新麦下列表

					that.msgs = msgs
					//如果用户发信息
					for (var q = 0; q < msgs.length; q++) {


						//显示用户发送文字和系统图片信息
						if (msgs[q].type == 'text') {
							console.log('显示用户发送文1', q)

							if (msgs[q].custom.length == 0) {

								console.log('custom数据为空')
								return
							}

							if (JSON.parse(msgs[q].custom).vip > 0) {
								that.vipnTxt = '<img class="vipNum" src="' + that.$BASE_URL +
									'/st/mini/static/img/vip1/vip_' + JSON
									.parse(msgs[q].custom).vip + '@2x.png"/>'
							} else {
								that.vipnTxt = ""
							}
							if (that.creator == msgs[q].from) {
								that.liaotianFn(that.vipnTxt + '<span style="color:#487bc9">[房主]</span>', msgs[
										q]
									.fromNick,
									msgs[q]
									.text);
							} else {
								that.liaotianFn(that.vipnTxt + '<span style="color:#487bc9"></span>', msgs[q]
									.fromNick,
									msgs[q]
									.text);
							}
							// if(msgs[q].fromCustom!=''){
							// 	that.liaotianFn(that.vipnTxt ,JSON.parse(msgs[q].fromCustom).greeting);
							// }
							// else if(JSON.parse(msgs[0].fromCustom).isOurUser==2){
							// 	liaotianFn(that.vipnTxt,msgs[0].fromNick,msgs[0].text);
							// }
							//       		else if(JSON.parse(msgs[0].fromCustom).isOurUser==1){
							// liaotianFn('<span style="color:#e59489">[接待]</span>',msgs[0].fromNick,msgs[0].text);
							//       		}
							// that.$nextTick(() => {
							// 	let con = document.getElementById('messageBox'); // 获取对象
							// 	console.log(con.scrollHeight)
							// 	setTimeout(() => {
							// 		con.scrollTop = 50000; // 滚动高度
							// 	}, 0);
							// });
						}

						//进入房间提示用户－notification
						if (msgs[q].type == 'notification' && msgs[q].attach.type == 'memberEnter') {
							var info = msgs[q].attach.fromNick



							if (info != undefined || info != null) {
								if (msgs[q].attach.fromNick != "游客") {
									if (msgs[q].attach.custom) {
										var vipNum = JSON.parse(msgs[q].attach.custom).vip;
										console.log(vipNum, 'vipNumvipNum')
										if (msgs[q].fromCustom != '') {
											if (JSON.parse(msgs[q].attach.custom).vip > 0) {
												that.vipnTxt = '<img class="vipNum" src="' + that.$BASE_URL +
													'/st/mini/static/img/vip1/vip_' +
													JSON
													.parse(msgs[q].attach.custom).vip + '@2x.png"/>'
											} else {
												that.vipnTxt = ""
											}
											// 进入用户提醒

											if (vipNum == 0) {
												// 进入用户提醒
												that.getInto(that.vipnTxt + info)
											} else {
												that.getInto(
													'<img class="vipNum"  src="' + that.$BASE_URL +
													'/st/mini/static/img/vip1/vip_' +
													JSON.parse(msgs[q].attach.custom).vip + '@2x.png"/>' +
													info)
											}




										} else {

											//进入用户提醒
											that.getInto(
												'<img class="vipNum"  src="' + that.$BASE_URL +
												'/st/mini/static/img/vip1/vip_' +
												JSON.parse(msgs[q].attach.custom).vip + '@2x.png"/>' + info
											)
										}
									} else {
										if (msgs[q].fromCustom != '') {
											if (JSON.parse(msgs[q].attach.custom).vip > 0) {
												that.vipnTxt = '<img class="vipNum" src="' + that.$BASE_URL +
													'/st/mini/static/img/vip1/vip_' +
													JSON
													.parse(msgs[q].attach.custom).vip + '@2x.png"/>'
											} else {
												that.vipnTxt = ""
											}
											if (JSON.parse(msgs[q].fromCustom).greeting != undefined) {
												that.liaotianFn(that.vipnTxt, JSON.parse(msgs[q].fromCustom)
													.greeting);
											} else {
												that.liaotianFn(that.vipnTxt, JSON.parse(msgs[q].fromCustom)
													.nickName +
													'进入聊天室，欢迎~');
											}

										} else {
											//进入用户提醒
											that.getInto(info)
										}
									}
								} else {
									if (msgs[q].fromCustom != '') {
										if (JSON.parse(msgs[q].attach.custom).vip > 0) {
											that.vipnTxt = '<img class="vipNum" src="' + that.$BASE_URL +
												'/st/mini/static/img/vip1/vip_' +
												JSON
												.parse(msgs[q].attach.custom).vip + '@2x.png"/>'
										} else {
											that.vipnTxt = ""
										}
										that.liaotianFn(that.vipnTxt, JSON.parse(msgs[q].fromCustom).greeting);
									} else {
										//进入用户提醒
										that.getInto(info)
									}
								}
							} else {
								if (msgs[q].attach.fromNick != "游客") {
									if (msgs[q].attach.custom) {
										var vipNum = JSON.parse(msgs[q].attach.custom).vip;

										console.log(vipNum, 'var vipNumvar vipNum2')
										if (msgs[q].fromCustom != '') {
											if (JSON.parse(msgs[q].attach.custom).vip > 0) {
												that.vipnTxt = '<img class="vipNum" src="' + that.$BASE_URL +
													'/st/mini/static/img/vip1/vip_' +
													JSON
													.parse(msgs[q].attach.custom).vip + '@2x.png"/>'
											} else {
												that.vipnTxt = ""
											}



											var vipp = JSON.parse(msgs[q].attach.custom).vip

											if (vipp == 0) {
												//进入用户提醒
												that.getInto(JSON.parse(msgs[q].attach.custom).nickName)

											} else {



												//进入用户提醒
												that.getInto(
													'<img class="vipNum"  src="' + that.$BASE_URL +
													'/st/mini/static/img/vip1/vip_' +
													JSON.parse(msgs[q].attach.custom).vip + '@2x.png"/>' +
													JSON.parse(
														msgs[q].attach.custom).nickName)


											}








											// that.liaotianFn(that.vipnTxt, JSON.parse(msgs[q].fromCustom).greeting);
										} else { //进入用户提醒
											that.getInto(
												'<img class="vipNum"  src="' + that.$BASE_URL +
												'/st/mini/static/img/vip1/vip_' +
												JSON.parse(msgs[q].attach.custom).vip + '@2x.png"/>' + JSON
												.parse(
													msgs[
														q].attach.custom).nickName)
										}
									} else {
										if (msgs[q].fromCustom != '') {
											if (JSON.parse(msgs[q].attach.custom).vip > 0) {
												that.vipnTxt = '<img class="vipNum" src="' + that.$BASE_URL +
													'/st/mini/static/img/vip1/vip_' +
													JSON
													.parse(msgs[q].attach.custom).vip + '@2x.png"/>'
											} else {
												that.vipnTxt = ""
											}
											if (JSON.parse(msgs[q].fromCustom).greeting != undefined) {
												that.liaotianFn(that.vipnTxt, JSON.parse(msgs[q].fromCustom)
													.greeting);
											} else {
												that.liaotianFn(that.vipnTxt, JSON.parse(msgs[q].fromCustom)
													.nickName +
													'进入聊天室，欢迎~');
											}

										} else {
											//进入用户提醒
											that.getInto(info)
										}
									}
								} else {
									if (msgs[q].fromCustom != '') {
										if (JSON.parse(msgs[q].attach.custom).vip > 0) {
											that.vipnTxt = '<img class="vipNum" src="' + that.$BASE_URL +
												'/st/mini/static/img/vip1/vip_' +
												JSON
												.parse(msgs[q].attach.custom).vip + '@2x.png"/>'
										} else {
											that.vipnTxt = ""
										}
										that.liaotianFn(that.vipnTxt, JSON.parse(msgs[q].fromCustom).greeting);
									} else {
										//进入用户提醒
										that.getInto(info)
									}
								}
							}
						}


						//在聊天室中触发： 禁言、解除禁言
						if (
							msgs[q].type == "notification" &&
							msgs[q].attach.type == "addTempMute"
						) {
							that.isMute = true;
							uni.showToast({
								title: "你已被禁言",
								icon: "none",
								duration: 2000,
							});
						} else if (
							msgs[q].type == "notification" &&
							msgs[q].attach.type == "removeTempMute"
						) {
							that.isMute = false;
							uni.showToast({
								title: "你已被解除禁言",
								icon: "none",
								duration: 2000,
							});
						}



						// 获取pk状态


						if (msgs[q].type == "notification" && msgs[q].attach.type == 'updateQueue' && msgs[q]
							.attach
							.queueChange.elementKey == "pkLiveStatus") {
							var s = JSON.parse(msgs[q].attach.queueChange.elementValue)

							// "status":"0"   // `0 = 没有PK  1 = 匹配中 2 = 即将开始 3 = 匹配失败 4 = PK中 5 = 惩罚时间` 6 平局
							var status = s.status
							// pk 信息列表
							that.pklist = s
							console.log('赋值给pklist', that.pklist)
							if (status == 0) {
								that.kqpk = false
								// 直播pk麦上波环
								clearTimeout(that.wofangpkgh);
								clearTimeout(that.duifangpkgh);
								// 直播倒计时
								clearTimeout(that.zbghs);
								that.pkresult = 0
							} else if (status == 1) {
								console.log('pk匹配中', s)
							} else if (status == 2) {
								console.log('pk即将开始', s)
							} else if (status == 3) {
								console.log('pk匹配失败', s)
							} else if (status == 4) {
								console.log('pk中', s)
								// 开启声波光环
								that.zhibopkbohuan()
								that.kqpk = true

								that.pktime = setInterval(function() {
									// 倒计时
									that.countdown();
								}, 1000);

							} else if (status == 5) {
								console.log('pk惩罚时间', s)


								// 判断胜负   1 房主胜利  2 对方胜利  3平局

								if (s.winUserId == that.managerUserId) {
									that.pkresult = 1
								} else if (s.winUserId == s.toUserId) {
									that.pkresult = 2

								}

							} else if (status == 6) {
								console.log('pk平局', s)
								that.pkresult = 3
							}
						}


						// 获取pk队列
						if (msgs[q].type == "notification" && msgs[q].attach.type == 'updateQueue' && msgs[q]
							.attach
							.queueChange.elementKey == "pkLiveContribution") {
							var s = JSON.parse(msgs[q].attach.queueChange.elementValue)

							// 自己队列
							that.fromList = s.fromList


							// 对方队列
							that.toList = s.toList



							for (let i = s.toList.length; i < 4; i++) {
								that.toList.push({})
							}








						}


						// pk 对抗进度条
						if (msgs[q].type == "notification" && msgs[q].attach.type == 'updateQueue' && msgs[q]
							.attach
							.queueChange.elementKey == "pkLiveNum") {
							var s = JSON.parse(msgs[q].attach.queueChange.elementValue)



							// 我方pk值
							that.fromContribut = s.fromContribut
							// 对方pk值
							that.toContribut = s.toContribut

							var z = s.fromContribut + s.toContribut


							if (z == 0) {
								// 50 %
								var k = '50%'
							} else {
								var d = s.fromContribut / z

								if (d > 0.9) {
									var d = 0.7

								}

								if (d < 0.1) {
									var d = 0.3
								}


								var k = d * 100 + '%'




							}
							console.log('pk值变化', k)

							that.pressWidth = k








						}


						// 触发修改心动值
						if (msgs[q].type == 'notification' && msgs[q].attach.type == 'updateQueue' && msgs[q]
							.attach
							.queueChange.elementKey == 'chatRoomBeckoning') {

							console.log('触发修改心动值')
							that.chatRoomBeckoning = JSON.parse(msgs[q].attach.queueChange.elementValue)
						}


						// 触发修改房间热度
						if (msgs[q].type == 'notification' && msgs[q].attach.type == 'updateQueue' && msgs[q]
							.attach
							.queueChange.elementKey == 'heat') {

							var s = JSON.parse(msgs[q].attach.queueChange.elementValue)
							that.onLineUser = s
							console.log('修改房间热度')


						}


						//更新上麦数据（锁，下麦，上麦）

						if (msgs[q].type == 'notification' && msgs[q].attach.type == 'updateQueue') {

							console.log('更新，更新，更新1141')
							// 更新获取 游客 管理员房主


							// var res = that.fangdou();
							// if(res){
							// 	that.dianji()
							// 	//发送公屏信息
							// }
							if (msgs[q].attach.queueChange.elementKey != undefined) {
								var index = msgs[q].attach.queueChange.elementKey;
								var obj = JSON.parse(msgs[q].attach.queueChange.elementValue).info;
							} else {
								var index = Object.keys(msgs[q].attach.queueChange.elementKv)[0]
								var obj = JSON.parse(msgs[q].attach.queueChange.elementKv[index]).info;
							}
							var num = parseInt(index.charAt(index.length - 1)); //位置
							// if (JSON.parse(msgs[q].attach.queueChange.elementValue).s_seat){
							// 	bhShangmaiFn(JSON.parse(msgs[q].attach.queueChange.elementValue).s_seat, num, obj, 'update')
							// } else {

							if (obj) {
								console.log('更新，更新，更新2222')
								// that.chatData = []

								chatroom.queueList({
									done(err, obj, content) {
										if (err) {
											console.error(err)
										}
										//初始化上麦信息
										console.log('获取队列', '初始化上麦信息2222')

										that.shangmaiFn(obj)
									}
								})
								// that.shangmaiFn(obj)
								// that.bhShangmaiFn(obj.seatState, obj.seat - 1, obj, 'update')
							}

							// }

						}
						// 禁麦，解除禁麦
						if (msgs[q].type == 'custom' && JSON.parse(msgs[q].content).type == 105) {
							that.liaotianFn('<span style="color:#FD6175;margin-right:5px">[系统]</span>', '',
								'用户 <span style="color:#26D4D0">' + JSON.parse(msgs[q].content).data
								.KEY_TARGET +
								'</span> 已被执行者 <span style="color:#26D4D0;margin-right:5px">' + JSON.parse(
									msgs[q]
									.content).data.KEY_NICK + ' </span> 解除禁麦'
							)
						} else if (msgs[q].type == 'custom' && JSON.parse(msgs[q].content).type == 106) {


							that.liaotianFn('<span style="color:#FD6175;margin-right:5px">[系统]</span>', '',
								'用户 <span style="color:#26D4D0">' + JSON.parse(msgs[q].content).data
								.KEY_TARGET +
								'</span> 已被执行者 <span style="color:#26D4D0;margin-right:5px">' + JSON.parse(
									msgs[q]
									.content).data.KEY_NICK + ' </span> 禁麦'
							)
						}

						if (msgs[q].type == 'custom') {
							if (JSON.parse(msgs[q].content).type == 36) {
								//红包礼物
								//console.log(msgs)
								if (JSON.parse(msgs[q].custom).vip > 0) {
									that.vipnTxt = '<img class="vipNum" src="' + that.$BASE_URL +
										'/st/mini/static/img/vip1/vip_' +
										JSON.parse(msgs[q].custom).vip + '@2x.png"/>'
								} else {
									that.vipnTxt = ""
								}
								if (that.creator == msgs[q].from) {
									that.liaotianFn(that.vipnTxt + '<span style="color:#487bc9">[房主]</span>',
										'', msgs[q]
										.fromNick +
										' 发了 <span style="color:red">' + JSON.parse(msgs[q].content).data
										.themeName +
										'</span><img class="hb" src="https://ourydcimage.shenghua6.cn/redbag/theme/10001/sCoverImage.png">'
									)
								} else {
									that.liaotianFn(that.vipnTxt + '<span style="color:#487bc9"></span>', '',
										msgs[q]
										.fromNick +
										' 发了 <span style="color:red">' + JSON.parse(msgs[q].content).data
										.themeName +
										'</span><img class="hb" src="https://ourydcimage.shenghua6.cn/redbag/theme/10001/sCoverImage.png">'
									)
								}
								//       		else if(JSON.parse(msgs[0].fromCustom).isOurUser==2){
								// liaotianFn(that.vipnTxt,'',msgs[0].fromNick+' 发了 <span style="color:red">'+JSON.parse(msgs[0].content).data.themeName+'</span><img class="hb" src="https://ourydcimage.shenghua6.cn/redbag/theme/10001/sCoverImage.png">')
								//       		}else if(JSON.parse(msgs[0].fromCustom).isOurUser==1){
								// liaotianFn('"'+that.vipnTxt+'"<span style="color:#e59489">[接待]</span>','',msgs[0].fromNick+' 发了 <span style="color:red">'+JSON.parse(msgs[0].content).data.themeName+'</span><img class="hb" src="https://ourydcimage.shenghua6.cn/redbag/theme/10001/sCoverImage.png">')
								//       		}

								// that.$nextTick(() => {
								// 	let con = document.getElementById('messageBox'); // 获取对象
								// 	setTimeout(() => {
								// 		con.scrollTop = con.scrollHeight; // 滚动高度
								// 	}, 0);
								// }); //有新消息就置顶
							}
						}
						//显示表情和礼物

						// 更新麦上信息
						// 更新麦下列表 实时
						console.log('msgs[q].type类型', q, msgs[q].type)

						if (q == 1) {
							setTimeout(function() {
								that.getChatroomMembers()
							}, 2000)


						}







						if (msgs[q].type == 'custom' && JSON.parse(msgs[q].content).type == 10) {

							console.log('礼物等于10', msgs[q])
							// 判断如果发礼物的是自己的话, 返回的vip信息更新
							if (that.userId == msgs[q].from) {
								var vipNum = JSON.parse(msgs[q].custom).vip
								that.fromCustom.vip = vipNum
								console.log('vip等级66', vipNum)
								that.fangfa(vipNum)
							}

							var xy = JSON.parse(msgs[q].content)



							var s = JSON.parse(msgs[q].content).data.toUserId
							var d = that.fangzhu.account


							// 判断打赏给谁
							if (s == that.fangzhu.account) {
								var seat = 0
							} else {
								// 过滤666
								for (var i = 0; i < that.chatData.length; i++) {
									if (that.chatData[i].userId == s) {
										var seat = that.chatData[i].seat
									}
								}
							}



							// 跟随动画地址

							var urs = JSON.parse(msgs[q].content).data.giftImg

							if (urs) {
								var pngl = 'https://ourydcimage.shenghua6.cn/' + JSON.parse(msgs[q].content).data
									.giftImg

								// var pngl="https://ourydcimage.shenghua6.cn/giftImage/gift/1_4100_1.png"


								that.pnglist.push({
									img: pngl,
									idx: seat
								})


								console.log('长度', that.pnglist)
								if (that.pnglist.length == 1) {
									that.gensui()
								}

							}


							// 

							if (JSON.parse(msgs[q].content).data.animationName) {

								// 要播放的动画路径
								console.log('动画礼物的名字', JSON.parse(msgs[q].content).data.animationName)
								that.animationUrl = 'https://ourydcimage.shenghua6.cn/animate/svga/applet/' + JSON
									.parse(msgs[
										q].content).data.animationName + '/' + JSON.parse(msgs[q].content).data
									.animationName + '.svga'
								// 动画路径数组
								// https://ourydcimage.shenghua6.cn/giftImage/gift/1_52100_8.png
								// 			var pngl = 'https://ourydcimage.shenghua6.cn/' + JSON.parse(msgs[q].content).data.giftImg
								// 			that.pnglist.push({
								// 				img: pngl,
								// 				idx: seat
								// 			})
								// 			console.log('长度', that.pnglist)
								// 			if (that.pnglist.length == 1) {
								// 				that.gensui()
								// 			}
								// 跟随礼物动画的数组  勿动勿动
								animationUrlData.push(that.animationUrl)
							}
							console.log('礼物动画列表', animationUrlData)
							console.log('that.show为', that.show)

							// show 为true 的情况下,且  动画列表数据不为空 可执行触发动画
							if (that.show && animationUrlData.length != 0) {
								console.log('that.show为', that.show, "触发礼物播放按钮")
								// 播放动画
								that.loadSvga()
							}


							if (JSON.parse(msgs[q].content).data.present == 6) {
								//显示表情
								//console.log('显示表情')
								var ScoreId = JSON.parse(msgs[q].content).data.ScoreId; //表情编码

								var vvid = JSON.parse(msgs[q].custom).vip

								if (JSON.parse(msgs[q].custom).vip > 0) {
									that.vipnTxt = '<img class="vipNum" src="' + that.$BASE_URL +
										'/st/mini/static/img/vip1/vip_' +
										JSON.parse(msgs[q].custom).vip + '@2x.png"/>'
								} else {
									that.vipnTxt = ""
								}
								// var dk = msgs[q].from
								// console.log('dk = msgs[q].from', msgs[q])
								// var dkj = JSON.parse(msgs[q].fromCustom).isOurUser
								// console.log('dk = msgs[q].from', msgs[q])

								console.log('isOurUse', q, msgs)
								if (that.creator == msgs[q].from) {
									var s = that.jxFn(ScoreId)

									that.liaotianFn(that.vipnTxt + '<span style="color:#487bc9">[房主]</span>',
										msgs[q]
										.fromNick,
										'<img class="bqIcon" src="' + that.jxFn(ScoreId) + '" />');
								}
								// 此处有问题
								//  else if (JSON.parse(msgs[q].fromCustom).isOurUser == 2) {

								// 	that.liaotianFn(that.vipnTxt, msgs[q].fromNick, '<img class="bqIcon" src="' + that
								// 		.jxFn(
								// 			ScoreId) +
								// 		'" />');
								// } else if (JSON.parse(msgs[q].fromCustom).isOurUser == 1) {
								// 	that.liaotianFn(that.vipnTxt + '<span style="color:#e59489">[接待]</span>', msgs[q]
								// 		.fromNick,
								// 		'<img class="bqIcon" src="' + that.jxFn(ScoreId) + '" />');
								// }

							} else if (JSON.parse(msgs[q].content).data.present == 4 || JSON.parse(msgs[q]
									.content).data
								.present == 5) {
								//礼物
								var ScoreId = JSON.parse(msgs[q].content).data
									.ScoreId; //积分礼物区分动画 与发送  动画使用giftAnim  礼物 使用ScoreId
								// var giftAnim = JSON.parse(msgs[q].content).data.giftAnim;
								//更新钻石数量
								if (JSON.parse(msgs[q].content).data.sendMoney != null) {
									var sendMoney = parseInt(JSON.parse(msgs[q].content).data.sendMoney)
									that.zsNum += sendMoney
								}
								if (JSON.parse(msgs[q].custom).vip > 0) {

									that.vipnTxt = '<img class="vipNum" src="' + that.$BASE_URL +
										'/st/mini/static/img/vip1/vip_' +
										JSON.parse(msgs[q].custom).vip + '@2x.png"/>'

								} else {
									that.vipnTxt = ""
								}
								var fromNick = JSON.parse(msgs[q].content).data.fromNickName; //谁发
								var toNick = JSON.parse(msgs[q].content).data.toNickName; //给谁



								// 判断打赏礼物的个数,
								var count = 0
								var giftCount = JSON.parse(msgs[q].content).data.count;
								if (giftCount > 1) {
									count = '×' + giftCount
								} else {
									count = ''
								}
								var giftName = JSON.parse(msgs[q].content).data.giftName;

								if (that.jiexiliwuFn(ScoreId)) {

									// that.vipnTxt

									that.liaotianFn(that.vipnTxt + '<span style="color:#487bc9"></span>', '',
										fromNick +
										'<span style="color:#f3ed53">打赏</span>' + toNick +
										'<span style="color:#f3ed53">' + that.jiexiliwuFn(ScoreId) +
										'</span><span>' +
										count + '</span>')
								} else {
									console.log('自己')
									that.liaotianFn(that.vipnTxt + '<span style="color:#487bc9"></span>', '',
										fromNick +
										'<span style="color:#f3ed53">打赏</span>' + toNick +
										'<span style="color:#f3ed53">' + giftName + '</span><span>' +
										count + '</span>')
								}
								// }
								// that.$nextTick(() => {
								// 	let con = document.getElementById('messageBox'); // 获取对象
								// 	setTimeout(() => {
								// 		con.scrollTop = con.scrollHeight; // 滚动高度
								// 	}, 0);
								// });
							}
							//	40 为 幸运礼物


						} else if (msgs[q].type == 'custom' && JSON.parse(msgs[q].content).type == 40) {
							var res = that.fangdou();

							console.log('礼物等于40', msgs[q])
							var xy = JSON.parse(msgs[q].content)
							var s = JSON.parse(msgs[q].content).data.ext.gifts[0].toUserId
							var d = that.fangzhu.account
							// 判断打赏给谁
							if (s == that.fangzhu.account) {
								var seat = 0
							} else {
								// 过滤666
								for (var i = 0; i < that.chatData.length; i++) {
									if (that.chatData[i].userId == s) {
										var seat = that.chatData[i].seat
									}
								}
							}



							// 跟随动画地址

							var pngl = 'https://ourydcimage.shenghua6.cn/' + JSON.parse(msgs[q].content).data
								.randomGiftImage


							that.pnglist.push({
								img: pngl,
								idx: seat
							})
							console.log('长度', that.pnglist)
							if (that.pnglist.length == 1) {
								that.gensui()
							}
							animationUrlData.push(that.animationUrl)

							if (res) {
								that.dianji()
								//发送公屏信息
							}


							if (that.userId == msgs[q].from) {
								var vipNum = JSON.parse(msgs[q].custom).vip
								that.fromCustom.vip = vipNum
								console.log('vip等级66', vipNum)

								that.fangfa(vipNum)
							}


							var randomGiftId = JSON.parse(msgs[q].content).data.ext.randomGiftId; //幸运礼物的区分
							if (JSON.parse(msgs[q].content).data.sendMoney != null) {
								var sendMoney = parseInt(JSON.parse(msgs[q].content).data.sendMoney)
								that.zsNum += sendMoney
							} else {
								JSON.parse(msgs[q].content).data.ext.gifts.map((item, key) => {
									that.zsNum += item.sendMoney
								})
							}

							console.log('content' + JSON.parse(msgs[q].content))
							if (JSON.parse(msgs[q].content).data.ext.vip > 0) {
								that.vipnTxt = '<img class="vipNum"  src="' + that.$BASE_URL +
									'/st/mini/static/img/vip1/vip_' + JSON
									.parse(msgs[q].content).data.ext.vip + '@2x.png"/>'
							} else {
								that.vipnTxt = ""
							}


							// var giftType = '';
							// if (randomGiftId == '1_2600_1') {
							// 	giftType = '(幸运宝藏)'
							// } else if (randomGiftId == '1_160_1') {
							// 	giftType = '(幸运彩蛋)'
							// } else if (randomGiftId == '1_9900_2') {
							// 	giftType = '(幸运宝藏)'
							// } else if (randomGiftId == '1_990_1') {
							// 	giftType = ('幸运南瓜')
							// } else if (randomGiftId == '1_5800_2') {
							// 	giftType = ('惊喜大餐')
							// } else {
							// 	giftType = ('幸运礼物')
							// }
							if (JSON.parse(msgs[q].content).data.needApi == 1) {

							} else {
								for (var i in JSON.parse(msgs[q].content).data.ext.gifts) {
									var fromNick = JSON.parse(msgs[q].content).data.ext.gifts[i]
										.fromNickName; //谁发
									var toNick = JSON.parse(msgs[q].content).data.ext.gifts[i].toNickName; //给谁
									var ScoreId = JSON.parse(msgs[q].content).data.ext.gifts[i].giftId; // 礼物id
									var giftName = JSON.parse(msgs[q].content).data.ext.gifts[i]
										.giftName; // 礼物名称
									var giftCount = '';
									if (JSON.parse(msgs[q].content).data.ext.gifts[i].count > 1) {
										giftCount = '×' + JSON.parse(msgs[q].content).data.ext.gifts[i].count;
									}

									// /类型
									var giftType = JSON.parse(msgs[q].content).data.ext.randomGiftName

									if (that.jiexiliwuFn(ScoreId)) {
										that.liaotianFn(that.vipnTxt + '<span style="color:#487bc9"></span>',
											'',
											fromNick +
											'<span style="color:#f3ed53">打赏</span>' + toNick +
											'<span style="color:#f3ed53">' + that.jiexiliwuFn(ScoreId) +
											'</span><span style="color:#f3ed53">' + giftType +
											'</span><span>' +
											giftCount + '</span>')
									} else {
										// 如果礼物列表没有  取用消息体的名称 暂不播放动画
										that.liaotianFn(that.vipnTxt + '<span style="color:#487bc9"></span>',
											'',
											fromNick +
											'<span style="color:#f3ed53">打赏</span>' + toNick +
											'<span style="color:#f3ed53">' + giftName +
											'</span><span style="color:#f3ed53">（' + giftType +
											'）</span><span>' +
											giftCount + '</span>')
									}
								}
							}


						}
					}


					that.$nextTick(function() {

						that.clickEvnet(1)
					})
					// 查询 获取游客一些信息
					// that.getChatroomMembers()
					// 礼物上的麦上头像上麦数据
					// that.qusuy()
				}
				console.log('加载长连接完成数据')
			},

			// 赠送按钮灰色状态的弹窗
			huise: function() {
				// uni.showToast({
				// 	title: '',
				// 	duration: 2000,
				// 	icon: 'none'
				// });
				return
			},


			czPop(e) {

				if (e == 1) {
					uni.showToast({
						title: '更多精彩请下载“哩咔”APP',
						duration: 2000,
						icon: 'none'
					});
					return
				}

				this.giftShow = false
				this.shareShows = true




				this.tanchaungmd('关注公众号充值弹窗')



				// // #ifdef  MP-WEIXIN

				// // PopUpClick	弹窗内点击		$预置属性		
				// // 		$is_first_time	是否首次	BOOL	
				// // 		button_name	按钮名称	STRING	引导下载APP海报弹窗复制链接/引导下载APP海报弹窗点击下载/下载APP弹窗取消/下载APP弹窗一键复制/关注公众号充值弹窗保存
				// // 		PopUp_name	弹窗名称	STRING	引导下载APP海报弹窗/下载APP弹窗/关注公众号充值弹窗
				// // 		current_page	当前页面	STRING	交友tab/一对一消息/厅内/我tab
				// // 		room_id	房间ID	STRING	
				// getApp().sensors.track('PopUpClick', {
				// 	$is_first_time: uni.getStorageSync("shifoushouci") == 2 ? 'false' : 'true',
				// 	PopUp_name: '关注公众号充值弹窗',
				// 	button_name: '关注公众号充值弹窗保存',
				// 	current_page: '厅内',
				// 	room_id: '',
				// })
				// // #endif





				// if (this.isIndex == 1) {
				// 	uni.showToast({
				// 		title: '更多精彩请下载“哩咔”APP',
				// 		duration: 2000,
				// 		icon: 'none'
				// 	});
				// 	return
				// }
				// uni.showToast({
				// 	title: '请关注公众号进行充值',
				// 	duration: 2000,
				// 	icon: 'none'
				// });
			},
			zs() {


				// 触发下载弹窗
				this.downApp()


				// uni.showModal({
				// 	title: '提示',
				// 	content: '根据相关规范，ios小程序暂不支持',
				// 	confirmText: "知道了", // 确认按钮文字  
				// 	showCancel: false, // 是否显示取消按钮，默认为 true
				// 	success: (res) => {

				// 	}
				// })
			},

			// 点击禁止聊天弹窗的 分享连接复制
			downApps() {

				// 复制
				this.copy(this.downloadUrl)

				// 点击弹窗内的埋点
				this.tuanchuangnecz('引导下载APP海报弹窗', '引导下载APP海报弹窗复制链接')

			},


			// 弹窗点击到客服的埋点
			jinrfxkf: function() {

				this.tuanchuangnecz('引导下载APP海报弹窗', '引导下载APP海报弹窗点击下载')
			},




			downApp() {


				// 弹窗埋点
				this.tanchaungmd('下载APP弹窗');

				uni.showModal({
					title: '下载“哩咔”APP体验更多精彩内容',
					content: this.downloadUrl + '\n复制地址到浏览器下载',
					confirmText: "一键复制", // 确认按钮文字  
					showCancel: true, // 是否显示取消按钮，默认为 true
					success: (res) => {
						if (res.confirm) {
							this.copy(this.downloadUrl)

							this.tuanchuangnecz('下载APP弹窗', '下载APP弹窗一键复制')


						} else {
							console.log('else', res)
							this.tuanchuangnecz('下载APP弹窗', '下载APP弹窗取消')



						}
					}
				})



			},
			copy(value) {
				console.log(value, "被复制的内容北荣")
				uni.setClipboardData({
					data: value, //要被复制的内容
					success: function() {
						//重点~做笔记
						//在success中加入uni.hideToast()可以解决
						uni.showToast({
							title: '复制成功',
							duration: 2000,
							icon: 'none'
						});
						//以下就可自定义操作了~
					},
					fail: function(err) {
						uni.showToast({
							title: '复制失败',
							duration: 2000,
							icon: 'none'
						});
					}
				});
			},
			upNum() {

				this.numShow = true
				this.giftNumShow = false
			},

			// 打开数量
			giftNumChange() {
				if (this.isIndex1 >= 0) {
					this.giftNumShow = !this.giftNumShow

				} else {
					uni.showToast({
						title: '请先选择礼物',
						duration: 2000,
						icon: 'none'
					});
				}


			},

			// 关闭 数量弹窗
			giftNumChanges() {

				this.giftNumShow = false
			},

			giftChange(index, num) {
				this.num = num
				this.giftIndex = index
			},

			// 重新获取 上麦信息更新上麦信息
			dianji: function() {
				console.log('执行主动触发 返回列表')
				var _this = this
				//聊天室队列中获取列表	
				// _this.chatData = []


				chatroom.queueList({
					done(err, obj, content) {
						console.log(err, obj, content)
						if (err) {
							console.error(err)
						}
						console.log('获取队列', '初始化上麦信息')
						//初始化上麦信息


						setTimeout(function() {
							// var res = _this.fangdou();
							// if (res) {
							console.log('执行了shangmaiFn')
							_this.shangmaiFn(obj)
							// }

						}, 100);



					}
				})

			},
			// 自定义礼物数量打赏
			sendMoreGift(number) {



				var s = this.num1[0]
				// 修改后 弹窗
				if (number == 1) {
					this.num = this.num1
					this.numShow = false
					return
				}
				if (this.isMute) {
					uni.showToast({
						title: '您已被禁言',
						icon: 'none',
						duration: 2000
					});
					return
				}
				if (uni.getSystemInfoSync().platform != 'ios') {
					if (number == 1) {
						this.num = this.num1
					}
					if (this.num == 0 || s == 0) {
						uni.showToast({
							title: '数量不能为0',
							icon: 'none',
							duration: 2000
						});
						return
					}
					if (this.num > 99999) {
						uni.showToast({
							title: '礼物数量最大99999',
							icon: 'none',
							duration: 2000
						});
						return
					}

					// this.current = -1
					var data = []
					var data1 = []
					var data2 = []
					var url = ''

					// 过滤礼物 选中需要送礼物人的id


					for (let i = 0; i < this.maix.length; i++) {

						if (this.maix[i].tye) {
							data2.push(this.maix[i].userId)
						}
					}



					if (this.isIndex == 0) {
						var url = '/web/v2/api/redPackage/sendMoreGift'
					}
					if (this.isIndex == 1) {
						var url = '/web/v2/api/score/sendMoreScoreGift'
					}
					if (this.isIndex == 2) {
						var url = '/web/v2/api/pack/sendMoreGiftPropEx'
					}
					if (this.isIndex == 2) {
						var data = {
							url: url,
							methods: 'post',
							data: {
								type: this.roomId,
								roomUserId: this.managerUserId,
								toUserIds: data2.join(), //目标用户(多用户用"," 分隔) 字符串
								amId: this.propId, //礼物Id 字符串
								propNum: this.num, //礼物数量 整数数值 > 0
								apiVersion: '3.3', //版本号
								roomType: this.roomType, //房间类型 (所有类型参考表 ourydc_app_chat_room_config)
								// toUserSeatNums : //目标用户座位号(可选)
								times: 1 //次数 默认1
							}
						}
					} else {
						var data = {
							url: url,
							methods: 'post',
							data: {
								type: this.roomId,
								roomUserId: this.managerUserId,
								toUserIds: data2.join(), //目标用户(多用户用"," 分隔) 字符串
								giftId: this.propId, //礼物Id 字符串
								giftNum: this.num, //礼物数量 整数数值 > 0

								apiVersion: '3.3', //版本号
								roomType: this.roomType, //房间类型 (所有类型参考表 ourydc_app_chat_room_config)
								// toUserSeatNums : //目标用户座位号(可选)
								times: 1 //次数 默认1
							}
						}
					}
					// 打上礼物的接口
					this.$http(data).then(res => {
						console.log(res, "res666")
						this.$nextTick(() => {
							// this.current = 0
						})
						//需要修改的地方
						if (res.data.code == 21000) {
							// 礼物弹窗
							this.giftShow = false
							// 自定义礼物数量弹窗
							this.numShow = false
							// 礼物数量的选择
							this.giftNumShow = false
							// 底部弹出 打赏自己 我要下麦
							this.downShow = false
							// 数量
							this.num = 1
							this.num1 = ''
							// 礼物标题
							this.isIndex = 0
							// 选中状态的下标
							this.isIndex1 = 0
							// 钻石数量
							if (res.data.data.diamond) {
								this.diamond = res.data.data.diamond
							}
							if (res.data.data.remainScore) {
								this.score = res.data.data.remainScore
							}
							// 重新渲染 礼物数据
							this.getGiftList();
							// if (this.isIndex == 2) {
							// 	// 背包礼物查询重新渲染
							// 	this.chaxunbeibaoliw()
							// }
							// if (this.show) {
							// 	this.loadSvga()
							// }

							if (this.show && this.animationUrlData.length != 0) {
								this.loadSvga();
							}
						} else {
							uni.showToast({
								title: res.data.msg,
								icon: 'none',
								duration: 2000
							});
						}
						// 打赏礼物后更新麦上信息
					})
				} else {
					this.zs()
				}
			},
			// 礼物开关
			giftShowChange() {
				// 				var res = this.fangdou()
				// 				if (res) {
				this.giftShow = true
				this.isIndex1 = 0
				// this.giftShow1 = false
				// 更新礼物麦上列表 全选状态

				this.qusuy(1)

				// 是否只有一个选中状态
				// this.qxqm()


				// }
			},





			// 左右切换的时候 给当前礼物赋值的下标
			swiperChange() {
				this.isIndex1 = -1

				// 关闭数量
				this.giftNumShow = false
			},

			// 切换钻石金币背包
			changeTab(index) {

				this.current = -1
				this.giftData = []

				this.isIndex = index
				this.isIndex1 = -1
				// 钻石
				if (index == 0) {
					for (var i = 0, len = this.zuanshiData.length; i < len; i += 8) {
						this.giftData.push(this.zuanshiData.slice(i, i + 8));
					}

					// this.propId = this.giftData[0][0].id
					// this.animationUrl = this.giftData[0][0].animationUrl

				}
				// 金币
				if (index == 1) {
					for (var i = 0, len = this.jinbiData.length; i < len; i += 8) {
						this.giftData.push(this.jinbiData.slice(i, i + 8));
					}
					// this.propId = this.giftData[0][0].id
				}
				// 背包
				if (index == 2) {
					for (var i = 0, len = this.beibaoData.length; i < len; i += 8) {
						this.giftData.push(this.beibaoData.slice(i, i + 8));
					}


					// if (this.giftData[0][0].amId) {
					// 	this.propId = this.giftData[0][0].amId
					// }

				}

				this.$nextTick(() => {
					this.current = 0
				})

			},
			// 点击切换 礼物的选中状态
			changeGift(index, propId, animationUrl) {
				// 礼物id

				this.propId = propId
				// 礼物图片
				this.animationUrl = animationUrl
				// 礼物下标
				this.isIndex1 = index


				var that = this
				var arr = this.maix;
				//  方法1：利用对象访问属性的方法，判断对象中是否存在key
				var result = [];
				var obj = {};

				for (var i = 0; i < arr.length; i++) {
					if (!obj[arr[i].tye]) {
						result.push(arr[i]);
						obj[arr[i].tye] = true;
					}
				}
				console.log(result)

				if (result.length == 2) {
					that.zengsong = true
				} else if (result.length == 1) {


					if (result[0].tye == false) {

						that.zengsong = false
						console.log('执行了')

					}

				}






			},
			down(url) {
				var that = this
				uni.downloadFile({ //下载
					url: url, //图片下载地址
					success: res => {
						if (res.statusCode === 200) {
							uni.saveImageToPhotosAlbum({ //保存图片到系统相册。
								filePath: res.tempFilePath, //图片文件路径
								success: function() {
									that.shareShow = false
									that.shareShow1 = false
									uni.showToast({
										title: '图片保存成功',
										icon: 'none',
									});




								},
								fail: function(e) {
									that.shareShow = false
									that.shareShow1 = false
									uni.showToast({
										title: '图片保存失败',
										icon: 'none',
									});
								}
							});
						}
					}
				});
			},
			// 海报
			changeShare() {


				this.shareShow = false
				this.shareShow1 = true
				this.ssssss = true


				// 弹窗埋点
				this.tanchaungmd('引导下载APP海报弹窗');


			},



			// 海报生成
			hbsc: function() {

				if (this.roomName.length > 9) {
					var name = this.roomName.slice(0, 9) + '...';

				} else {
					var name = this.roomName
				}

				console.log('tximgstximgstximgs', this.tximgs)

				this.base = {
					width: '566rpx',
					height: '670rpx',
					// background: '#F0EFF8',
					background: '#fff',
					radius: '16rpx',
					views: [{
							type: 'image',
							src: this.tximgs,
							css: {
								left: '26rpx',
								top: '20rpx',
								width: '514rpx',
								height: '514rpx',
								radius: '6rpx'
							}
						},


						{
							type: 'text',
							text: name,
							css: {
								left: '20rpx',
								top: '536rpx',
								width: '560rpx',
								fontSize: '36rpx',
								color: '#181821',
								fontfamily: 'PingFangSC-Medium',
							}
						},

						{
							type: 'text',
							text: `ID: ${this.identityId}`,
							css: {
								color: '#181821',
								left: '20rpx',
								top: '582rpx',
								width: '560rpx',
								fontSize: '24rpx',
								fontfamily: 'PingFangSC-Regular',
							}
						},


						{
							type: 'text',
							text: `哩咔APP搜索，或点击保存二维码`,
							css: {
								left: '20rpx',
								top: '615rpx',
								width: '560rpx',
								fontSize: '20rpx',
								color: "#999999",
								fontfamily: 'PingFangSC-Regular',
							}
						},

						{
							type: 'image',
							src: this.erweima,
							css: {
								left: '440rpx',
								top: '546rpx',
								width: '100rpx',
								height: '100rpx'
							}
						},
					]
				};





			},






			// 点击麦下的显示隐藏弹窗
			changeOnline() {
				var res = this.fangdou();
				if (res == true) {
					this.onlineShow = true
					// 更新在线列表
					this.shuxizxlb()
				} else {
					this.onlineShow = false
					// 更新在线列表
					this.shuxizxlb()
				}
			},


			// 点击弹出分享

			shareshow: function() {


				console.log('list.url16', this.m3u8UrlData)





				var res = this.fangdou();
				if (res == true) {
					this.shareShow = true
				} else {
					this.shareShow = false
				}
			},


			// 防止恶意点击
			fangdou: function() {
				var nowTime = Math.round(new Date());

				console.log('距离上次点击', nowTime - this.tapTime, '毫秒')
				if (nowTime - this.tapTime < 500) {
					console.log('阻断')
					// uni.showToast({
					// 	title: `请勿频繁点击`,
					// 	icon: 'none',
					// 	duration: 2000
					// });
					this.tapTime = nowTime
					return false;
				} else {
					this.tapTime = nowTime
					return true
					console.log('执行')
				}

			},



			// 点击头像/*  */
			// 如果是自己的弹出下麦打赏
			changeDown(headImg, userId, index, seatState) {

				if (seatState == 2) {
					uni.showToast({
						title: '座位被锁',
						icon: 'none',
					});
					return
				}
				var nowTime = Math.round(new Date());
				console.log('距离上次点击', nowTime - this.tapTime, '毫秒')
				if (nowTime - this.tapTime < 500) {
					this.downShow = false
					console.log('阻断', this.downShow)
					// uni.showToast({
					// 	title: `请勿频繁点击`,
					// 	icon: 'none',
					// 	duration: 2000
					// });
					return false;
				}

				this.tapTime = nowTime
				this.mineuserId = userId
				this.offSeatIndex = index

				if (headImg != undefined && headImg != '') {

					if (userId == this.userId) {
						// 记录点击自己的头像的时候的位置id
						this.zjindx = index
						this.downShow = true
						console.log('弹出底部', this.downShow)
					} else {
						console.log('打赏礼物666', index)
						this.zjindx = index
						// 选中自己的id 打开礼物列表
						this.sendMine()

						// this.giftShowChange()
					}

				} else {
					// 上麦方法  上麦位置

					this.onSeat(index)

				}

				// 阻塞 因为 接口权限问题, 和产品沟通没有同步到测试, 第三方不支持

			},
			goBack() {


				// let pages = getCurrentPages();//当前页面栈
				// let prevPage = pages[pages.length - 2];//上一页面




				var _this = this
				wx.showModal({
					title: '',
					content: '返回将直接退出聊天室，是否退出？',
					success: function(res) {
						if (res.confirm) {


							// 当前用户下麦
							_this.offSeat()
							animationUrlData = []
							// 销毁实例
							chatroom.destroy()
							// 退出频道
							_this.client.leave();
							// 销毁
							_this.client.destroy()


							// 销毁声波光环
							clearTimeout(_this.timera);
							clearTimeout(_this.timerb);
							clearTimeout(_this.timerc);
							clearTimeout(_this.timerd);
							clearTimeout(_this.timere);
							clearTimeout(_this.timerf);
							clearTimeout(_this.timerg);
							clearTimeout(_this.zbghs);

							// 直播pk麦上波环
							clearTimeout(_this.wofangpkgh);
							clearTimeout(_this.duifangpkgh);
							// 直播倒计时
							clearTimeout(_this.zbghs);

							_this.timera = null;
							_this.timerb = null;
							_this.timerc = null;
							_this.timerd = null;
							_this.timere = null;
							_this.timerf = null;
							_this.timerg = null;
							_this.zbghs = null;

							console.log('点击确认回调')


							// 移除监听事件  
							uni.$off('updateHH');

							// uni.reLaunch({
							// 	url: "../../index/index"
							// })
							uni.navigateBack()
						} else {
							console.log('点击取消回调')
						}
					}
				})
			},

			statechange(e) {
				console.log('live-player code:', e.detail.code)
			},
			statechange1(e) {
				console.log('live-pusher code:', e.detail.code)
			},
			error(e) {
				console.error('live-player error:', e.detail.errMsg)
			},
			clickEvnet(type) {
				let that = this;

				that.goToBottom(type == 0 ? 0 : 99999)
			},
			goToBottom(scrollTop) {
				let that = this

				that.scrollTop = scrollTop + Math.random() * 10000

			},
			//解析拼接路径
			jxFn(bq) {
				console.log(22222, bq)

				var bqtemp = this.wzUrl + bq + ".gif";

				return bqtemp
			},

			//获取礼物接口
			liwuCodeFn() {
				var data = {
					url: '/chatroom/giftListEx',
					methods: 'post',
					data: {
						roomId: this.roomId
					}
				}
				this.$http(data).then(res => {
					if (res.data.code == 200) {
						var list = []
						for (var i in data.giftList) {
							for (var t in data.giftList[i].giftInfo) {
								list.push(data.giftList[i].giftInfo[t])
							}
						}
						this.lwcode = list
					} else {
						uni.showToast({
							title: res.data.msg,
							icon: 'none'
						})
					}
				})
			},
			getGiftList() {
				this.giftData = []
				this.zuanshiData = []
				var data = {
					url: '/web/v2/api/newApi/user/getGiftList',
					methods: 'post',
					data: {
						apiVersion: "3.1",
						type: "2",
						roomId: this.roomId
					}
				}
				this.$http(data).then(res => {
					console.log('钻石礼物', res)
					res.data.data.giftList.map((item, key) => {
						if (item.typeName == '礼物') {
							item.giftInfo.map((list, index) => {
								if (list.animationUrl != undefined && list
									.animationUrl != '') {
									// /animate/svga/applet/103_520000_1/103_520000_1.svga
									list.animationUrl =
										'https://ourydcimage.shenghua6.cn/animate/svga/applet/' +
										list
										.animationName + '/' + list.animationName +
										'.svga'
								}
								if (list.isMoney == 1) {
									this.zuanshiData.push(list)
								}
							})
						}
						if (item.typeName == '金币') {
							this.jinbiData = item.giftInfo
						}
						if (item.typeName == '背包') {
							// 每次请求背包的渲染前,清空一下原来数据

							this.beibaoData = []
							// 过滤掉背包有钻石的礼物
							for (var i = 0; i < item.giftInfo.length; i++) {
								if (item.giftInfo[i].unitName != '宝石') {
									this.beibaoData.push(item.giftInfo[i])
								}
							}


						}
					})

					for (var i = 0, len = this.zuanshiData.length; i < len; i += 8) {
						this.giftData.push(this.zuanshiData.slice(i, i + 8));
					}
					this.propId = this.giftData[0][0].id
					this.animationUrl = this.giftData[0][0].animationUrl
				})

			},

			// 打赏后更新背包礼物
			// chaxunbeibaoliw: function() {

			// 	this.giftData = []
			// 	this.zuanshiData = []
			// 	var data = {
			// 		url: '/web/v2/api/newApi/user/getGiftList',
			// 		methods: 'post',
			// 		data: {
			// 			apiVersion: "3.1",
			// 			type: "2",
			// 			roomId: this.roomId
			// 		}
			// 	}
			// 	this.$http(data).then(res => {

			// 		res.data.data.giftList.map((item, key) => {


			// 			if (item.typeName == '背包') {
			// 				// 每次请求背包的渲染前,清空一下原来数据
			// 				this.beibaoData = []
			// 				// 过滤掉背包有钻石的礼物
			// 				for (var i = 0; i < item.giftInfo.length; i++) {
			// 					if (item.giftInfo[i].unitName != '宝石') {
			// 						this.beibaoData.push(item.giftInfo[i])
			// 					}
			// 				}




			// 				for (var i = 0, len = this.beibaoData.length; i < len; i += 8) {
			// 					this.giftData.push(this.beibaoData.slice(i, i + 8));
			// 				}




			// 			}
			// 		})
			// 		// this.propId = this.giftData[0][0].id
			// 		// this.animationUrl = this.giftData[0][0].animationUrl
			// 	})
			// },







			/**
			 * 初始化sdk推流
			 */
			initAgoraChannel(uid, channel) {
				// var uid = this.managerUserId
				console.log("初始化sdk推流===============")
				return new Promise((resolve, reject) => {


					console.log('聊天室厅的信息,', resolve, reject)


					let client = {}
					client = new AgoraMiniappSDK.Client()
					this.client = client
					this.subscribeEvents(client)
					console.log('打印的内容')
					// 唤起sdk 内置打印功能/*  */
					// AgoraMiniappSDK.LOG.setLogLevel(0)
					client.init('d316d61d79484ee6a6a3b84272dd3d31', () => {
						// pass key instead of undefined if certificate is enabled

						client.join(null, channel, uid, () => {


							console.log(uid, "聊天室厅的信息uid", channel)
						}, e => {

							console.log(e, "聊天室厅的信息1")
							reject(e)
						})
					}, e => {
						console.log(e, "聊天室厅的信息2")
						reject(e);
					});
				});
			},
			deleteById(id, list) {
				for (let index = list.length - 1; index >= 0; index--) {
					if (list[index] && list[index].id === id) {
						list.splice(index, 1)
					}
				}
				this.m3u8UrlData = list
				return list
			},
			/**
			 * 注册stream事件
			 */
			subscribeEvents(client) {
				console.log(client)






				client.on("stream-added", e => {
					console.log(e.uid)
					let uid = e.uid;
					/**
					 * subscribe to get corresponding url
					 */
					client.subscribe(uid, (url, rotation) => {
						var str = {
							uid: uid,
							url: url
						}
						console.log('000000000000000000000000000000000000000000', str)
						this.m3u8UrlData.push(str)
						console.log(this.m3u8UrlData)
						// this.m3u8Url=url
					}, e => {
						console.log(`stream subscribed failed ${e} ${e.code} ${e.reason}`);
					});
				});
				/**
				 * remove stream when it leaves the channel
				 */
				client.on("stream-removed", e => {
					this.deleteById(uid, this.m3u8UrlData)
					let uid = e.uid;
					console.log(`stream ${uid} removed`);
					// this.removeMedia(uid);
				});
				// 通知应用程序远端用户已停止发送音频流。 该回调中会包含停止发送音频流的用户 ID。
				// 关闭 
				client.on("mute-audio", e => {

					var _this = this

					console.log('通知应用程序远端用户已停止发送音频流。 该回调中会包含停止发送音频流的用户 ID。')
					if (_this.roomType == 33) {
						_this.zhibogq = false
					}


					console.log(e);
					var uid = e.uid
					_this.chatData
					_this.guolvxiabiao.push(uid)
					// 修改波环的隐藏
					console.log('删除前的数组', _this.guolvxiabiao)

				});
				// 恢复
				// 通知应用程序远端用户已恢复发送音频流。 该回调中会包含停止发送音频流的用户 ID。
				client.on("unmute-audio", e => {
					// this.deleteById(uid, this.m3u8UrlData)
					// let uid = e.uid;

					console.log('通知应用程序远端用户已恢复发送音频流。 该回调中会包含停止发送音频流的用户 ID。')
					var _this = this
					if (_this.roomType == 33) {
						_this.zhibogq = true
					}

					console.log(e);
					var uid = e.uid
					console.log('恢复执行发送音频流', _this.chatData)

					_this.guolvxiabiao
					// 删除恢复的 禁麦限制
					_this.yschsl(e.uid)
				});


				// 声网通讯状态的监听 

				// client.on(event: "error",callback: (evt: {code: number,reason: string}) => void)

				client.on('error', e => {
					console.log('声网的错误码', e)
				})

			},

			// 删除恢复的 禁麦限制
			yschsl: function(e) {
				var _this = this

				for (var a = 0; a < _this.guolvxiabiao.length; a++) {
					if (e == _this.guolvxiabiao[a]) {

						console.log(a, '恢复执行发送音频流删除')
						_this.guolvxiabiao.splice(a, 1)
					}
					console.log('删除后的数组', _this.guolvxiabiao)
				}

			},

			// 声网初始化
			initFZFn() {

				var that = this;
				// 获取礼物的请求
				this.liwuCodeFn();
				var data = {
					url: "/web/v2/api/chatRoom/inChatRoom",
					methods: 'post',
					data: {
						// "apiVersion":"3.8",
						"roomId": this.roomId
						// "signature":"wEW16nuGnH7YNO/Xs42QWMRu17w=",
						// "source":"8"
					}
				}

				this.$http(data).then(res => {

					if (res.data.code == 25110) {
						this.privateRoom = true;
					} else {

						this.privateRoom = false;
						var res = res.data || res

						console.log('聊天室厅的信息', res)
						// 总麦位数量
						this.zmaiwei = res.data.chatRoomInfo.seatNum
						if (res.data.ChatRoomAddress) {
							console.log('房间类型', res.data)
							if (res.data.roomType == '3') {
								alert('进厅失败，请下载app');
								return;
							}
							var lisl = res.data.chatRoomInfo.roomAnnouncement

							res.data.chatRoomInfo.roomIntroduce

							// 玩儿法 波多女神有问题


							if (res.data.chatRoomInfo.identityId == "4252345") {



							} else {

								this.wanfa = !this.wanfa;
								this.roomIntroduce = Base64.decode(res.data.chatRoomInfo
									.roomIntroduce);

							}

							// 当前 厅主 是否被关注
							this.dqisAttention = res.data.chatRoomInfo.isAttention

							// 27 女神厅 33直播厅 判断 聊天室类别
							this.zblb = res.data.roomType

							this.roomType = res.data.roomType;


							this.chatRoomAddress = res.data.ChatRoomAddress.addr[0]; //房间地址

							console.log(1111, res.data.ChatRoomAddress, this.chatRoomAddress)
							// roomHlsPullUrl = data.chatRoomInfo.roomHlsPullUrl;
							// 房主id
							this.managerUserId = res.data.chatRoomInfo.managerUserId
							this.managerHeadImg = res.data.chatRoomInfo.managerHeadImg
							this.roomName = res.data.chatRoomInfo.roomName //房间名称
							this.identityId = res.data.chatRoomInfo.identityId //房间id
							this.managerNickName = res.data.chatRoomInfo.managerNickName


							// 语音直播流
							this.yuyinzhiboliu = res.data.chatRoomInfo.roomRtmpPullUrl


							// 原来的背景图片
							if (res.data.bgImgUrl != null) {

								this.bgImg = this.$global.getImageUrl(res.data.bgImgUrl,
									'https://ourydcimage.shenghua6.cn') //背景图片
								// this.bgImg = this.$global.getImageUrl(res.data.bgImgUrl +
								// 	'?x-oss-process=image/bright,15/resize,m_fill,h_' + this.bjheight + ',' +
								// 	'w_' + this.bjwidth,
								// 	'https://ourydcimage.shenghua6.cn') //背景图片
								console.log(this.bgImg)

							} else {

								this.bgImg = this.$global.getImageUrl(JSON.parse(res.data.chatRoomInfo
										.chatRoomBgImg)
									.backgroundImg,
									'https://ourydcimage.shenghua6.cn') //背景图片
								console.log(this.bgImg)
							}


							if (res.data.roomType == 33) {
								// 正确的背景图		
								this.bgImg = this.$global.getImageUrl(JSON.parse(res.data.chatRoomInfo
										.chatRoomBgImg)
									.backgroundImg,
									'https://ourydcimage.shenghua6.cn') //背景图片
								// 		console.log(this.bgImg)

							}





							var str2 = res.data.chatRoomInfo.roomAnnouncement
							this.liaottianTxt = "<li class='li'>" +
								"<pre class='pre'  >" +
								str2 + "</pre>" +
								"</li>";


							this.liaottianTxtData.push(this.liaottianTxt)
							//渲染首页头像－头部

							var hBgImg = this.$global.getImageUrl(res.data.chatRoomInfo
								.managerHeadImg,
								'https://ourydcimage.shenghua6.cn')
							// 生成海报需要的头像图片
							this.tximgs = hBgImg +
								'?x-oss-process=image/bright,15/resize,m_fill,h_400,w_400'

							this.hBgImg = hBgImg +
								'?x-oss-process=image/bright,15/resize,m_fill,h_110,w_110'



							this.uids = res.data.chatRoomInfo.managerUserId;
							this.ufztx = res.data.chatRoomInfo.managerHeadImg;
							// let  bjgim =  this.$global.getImageUrl(res.data.chatRoomInfo.managerHeadImg,
							// 'https://ourydcimage.shenghua6.cn')

							// 声音初始化
							this.syint()

							// 重新连接
							this.playFn()

							// 渲染礼物数据
							this.getGiftList()
							// this.configChatRoomExpressionListDt()
						} else {
							// 聊天室关闭
							this.liveOver = true;
						}
					}
				})
			},


			// 声音初始化

			syint: function() {

				let channel = this.channelId;
				let uid = uni.getStorageSync("userInfo").identityId


				this.initAgoraChannel(uid, channel).then(url => {


				}).catch(e => {

					console.log(e, "客户端初始化失1败", uid)
					// uni.showToast({
					// 	title: `客户端初始化失败`,
					// 	icon: 'none',
					// 	duration: 4000
					// });

					uni.showToast({
						title: `进厅失败,请重试`,
						icon: 'none',
						duration: 4000
					});


					setTimeout(function() {
						// uni.redirectTo({
						// 	url: '/pages/login/wxlogin'
						// })
						that.client.leave();
						// 返回
						uni.navigateBack()



						// // 清空本地消息缓存
						// getApp().globalData = {
						// 	sessions: [],
						// 	set: 1,
						// 	huihua: []
						// }
						// //清除本地登录状态
						// uni.clearStorage();
						// //IM实例销毁
						// Vue.prototype.$NIM.disconnect();




					}, 3000);

				});


			},





			playFn() {
				// this.videoContext = uni.createVideoContext('myAudio')
				// var audio = uni.createVideoContext('myAudio')
				// audio.play();
				// //连接房间
				if (this.roomType == '3') {
					// uni.showToast({
					// 	title: `客户端初始化失败`,
					// 	icon: 'none',
					// 	duration: 3000
					// });
					return;
				} else {
					this.roomFn()
				}
				var oneTime = '';
				var that = this
			},
			bofangFn(path) {
				// console.log('xxssxxxxxxxxxxxxxxxxxxxxxx')
				// console.log(this.bodyMovinList)
				// this.bodyMovinList.shift();
				// console.log(this.bodyMovinList)
				// console.log('zzzzzzzzzzzzzzzzzzzzzzzzzzz')
				// this.bodymovin = true;
				// $('#bodymovin').show();
				// var animData = {
				// 	wrapper: document.getElementById('bodymovin'),
				// 	renderer: 'svg',
				// 	loop: false,
				// 	autoplay: true,
				// 	path: path,
				// 	autoloadSegments: false
				// };
				// var anim = bodymovin.loadAnimation(animData);
				// var audio = $('#myAudio')[0];
				// audio.load();
				// audio.pause();
				// audio.play();
				// anim.addEventListener('complete', function() {
				// 	this.bodyMovinList.shift();
				// 	console.log(this.bodyMovinList)
				// 	// audio.paused()
				// 	$('#bodymovin').hide();
				// 	anim.destroy();
				// 	this.bodymovin = false;
				// 	if (this.bodyMovinList.length > 0) {
				// 		this.audioUrl = 'https://ourydcimage.shenghua6.cn/animate/web/' + this.bodyMovinList[0] + '/' +
				// 			this.bodyMovinList[0] + '.mp3';
				// 		this.bofangFn('https://ourydcimage.shenghua6.cn/animate/web/' + this.bodyMovinList[0] + '/' + app
				// 			.bodyMovinList[0] + '.json')
				// 	}
				// });
			},
			//聊天信息发送
			liaotianFn(type, phoneNum, txt) {


				if (txt == undefined) {
					this.liaottianTxt = "<li class='li'>" + type +
						"<p style='display:inline;'>" + phoneNum + "</p></li>";
				} else {
					if (phoneNum == '') {
						this.liaottianTxt = "<li class='li'>" + type +
							"<p style='display:inline;'>" + phoneNum + "</p>" + txt +
							"</li>";
					} else {
						this.liaottianTxt = "<li class='li'>" + type +
							"<p style='display:inline;'>" + phoneNum + ":</p>" +
							txt + "</li>";
					}
				}
				this.liaottianTxtData.push(this.liaottianTxt)
			},
			//解析礼物
			jiexiliwuFn(code) {
				var codeTxt = "";
				for (var i = 0; i < this.lwcode.length; i++) {
					//for(var j=0;j<this.lwcode.packageConfig[i].giftInfo.length;j++){
					if (this.lwcode[i].id == code) {
						console.log(this.lwcode[i])
						console.log(this.lwcode[i].name)
						if (this.lwcode[i].name) {
							codeTxt = this.lwcode[i].name;
						} else {
							codeTxt = this.lwcode[i].giftName;
						}
						if (this.lwcode[i].animationName != "") {
							//如果animationName为空就不播放动画
							//礼物播放的列表
							this.bodyMovinList.push(this.lwcode[i].animationName);
							if (!this.bodymovin) {
								this.audioUrl = 'https://ourydcimage.shenghua6.cn/animate/web/' + this
									.bodyMovinList[0] +
									'/' +
									this.bodyMovinList[0] + '.mp3';
								console.log(this.audioUrl)
								this.bofangFn('https://ourydcimage.shenghua6.cn/animate/web/' + this
									.bodyMovinList[0] +
									'/' +
									app
									.bodyMovinList[0] + '.json');
							}
							// 更新麦上信息
							this.dianji()
						}
						return codeTxt;
					}
				}

			},

			// 获取上麦位置
			onSeatx() {

				console.log(this.chatData)

				for (let i = 0; i < this.chatData.length; i++) {
					if (!this.chatData[i].userId) {
						console.log(this.chatData[i].seat)
						this.onSeat(this.chatData[i].seat)
						return
					}
				}
			},

			// 上麦接口
			onSeat(seatNum) {


				console.log(seatNum, "shangmai")
				var _this = this

				var data = {
					url: '/web/p1/chatroom/applyseat',
					methods: 'post',
					data: {
						roomId: this.roomId,
						seat: seatNum
					}
				}
				this.$http(data).then(res => {
					// return

					if (res.data.code == 1) {

						uni.showToast({
							title: res.data.msg,
							icon: "none",
							duration: 2000,
						});


						return
					}

					_this.client.setRole(this.userId);
					console.log('this.userId', this.userId)

					_this.client.publish(url => {

						this.pushurl = url
						console.log(url, "url")
						console.log('上麦接口成功', `client publish success`);
					}, e => {
						console.log('上麦接口',
							`client publish failed: ${e}`);
					});

					if (res.data.code == 0) {
						this.lianmai = false
					}

				})

			},
			// 下麦接口
			offSeat() {
				// 防抖
				var res = this.fangdou();
				if (res) {
					console.log('下麦下麦下麦下麦下麦下麦,roomId:', this.roomId, this.offSeatIndex)

					var data = {
						url: '/web/p1/chatroom/offSeat',
						methods: 'post',
						data: {
							roomId: this.roomId,
							seat: this.offSeatIndex
						}
					}
					this.$http(data).then(res => {
						console.log('下麦', res)
						if (res.data.code == 0) {
							this.lianmai = true
							this.maike = false
						}
						this.downShow = false
						this.client.unpublish(url => {
							this.pushurl = ''
						}, e => {

						});
					})
				}
			},
			// 聊天室表情
			// configChatRoomExpressionListDt() {
			// 	var data = {
			// 		url: '/web/p1/systemConfig/configChatRoomExpressionListDt',
			// 		methods: 'post',
			// 		data: {
			// 			roomManager: this.identityId
			// 		}
			// 	}
			// 	this.$http(data).then(res => {

			// 	})
			// },
			// 下载地址
			getAppDownloadUrl(clientType) {
				 
				var data = {
					url: '/web/v2/api/newApi/app/getAppDownloadUrl',
					methods: 'post',
					data: {
						clientType: uni.getStorageSync("qudao")
					}
				}
				this.$http(data).then(res => {

					this.downloadUrl = res.data.data.url
				})
			},

			sendMsg() {
				//禁言状态不能发送信息跟礼物
				if (this.isMute) {
					uni.showToast({
						title: "你已被禁言",
						icon: "none",
						duration: 2000,
					});
				} else {
					this.textCheck()
				}
			},
			// 获取游客成员列表
			getChatroomMembers() {

				var that = this

				chatroom.getChatroomMembers({
					guest: true, // 是否游客//
					onlyOnline: true, // 只获取在线的固定成员
					// 'owner' (房主)
					// 'manager' (管理员)
					// 'restricted' (受限制, 被拉黑或者禁言)
					// 'common' (普通成员)
					// 'guest' (游客)			
					done: getChatroomMembersDone
				});

				function getChatroomMembersDone(error, obj) {
					console.log('获取成员列表', error, obj)

					console.log('获取成员列表 true 游客', obj.members)
					obj.members.map((item, key) => {
						if (item.custom != '') {
							item.custom = JSON.parse(item.custom)
						}
					})

					// that.peopleData = [].concat(obj.members)

					that.peopleDataold = [].concat(obj.members)


					that.peopleData6 = obj.members
					// console.log('peopleData6', obj.members)



					// 获取管理员和房主
					that.getChatroomMembers1()

				}
			},

			// 过滤 麦下用户
			guolvmxms: function() {

				// peopleDataold
				// 麦下列表
				var that = this
				let ids = this.peopleDataold;
				// 麦上列表
				let arr = this.chatData;



				var result = ids.filter(function(item1) {
					return arr.every(function(item2) {
						return item1.account !== item2.userId
					})
				})


				console.log(result);

				// this.peopleData= result

				var nowTime = Math.round(new Date());

				console.log('距离上次点击', nowTime - this.tapTime, '毫秒')
				if (nowTime - this.tapTime) {
					that.peopleData = []
					that.peopleDatalent = result.length
					that.peopleData = result

					// 麦下列表的长度/
					that.bangding()

					console.log('执行1上', nowTime - this.tapTime)
				} else {

					console.log('执行1下', nowTime - this.tapTime)
				}
				this.tapTime = nowTime

				return result

			},
			// 获取房主 插入 线下列表
			getChatroomMembers1() {

				var that = this
				chatroom.getChatroomMembers({
					guest: false,
					// onlyOnline:true,
					// 'owner' (房主)
					// 'manager' (管理员)
					// 'restricted' (受限制, 被拉黑或者禁言)
					// 'common' (普通成员)
					// 'guest' (游客)
					limit: 999,
					done: getChatroomMembersDone
				});


				// if (that.userId == item.account && item.tempMuted) {
				// 	that.isMute = true;
				// } else {
				// 	that.isMute = false;
				// }



				//  单独 获取房主  和管理员   
				function getChatroomMembersDone(error, obj) {
					console.log('获取聊天室成员false信息', error, obj)


					obj.members.map((item, key) => {
						if (item.custom != '') {
							item.custom = JSON.parse(item.custom)
						}
					})


					console.log(obj.members, "单独 获取房主  和管理员   房主")
					for (var i = 0; i < obj.members.length; i++) {
						// 判断是管理员


						if (obj.members[i].type == "manager" && obj.members[i].online) {
							console.log(i, '个是管理员')
							that.peopleDataold.push(obj.members[i])

						}
						// 判断是管理员
						if (obj.members[i].type == "common" && obj.members[i].online) {
							console.log(i, '是个普通版游客')
							that.peopleDataold.push(obj.members[i])

						}
						// 判断是房主
						if (obj.members[i].type == "owner") {
							that.fangzhu = obj.members[i]
							console.log(i, '个是房主')
						}
						// // 判断是否被禁言
						// if (obj.members[i].type == "restricted") {

						// 	console.log(i, '是被禁言的')
						// } 
						if (obj.members[i].online) {

							that.peopleData6.push(obj.members[i])

							console.log('peopleData6', that.peopleData6)

							// console.log('peopleData6', obj.members[i])
						}


					}
					//过滤麦下用户
					// 'that.zaixianliebiaoquchong()'

					that.guolvmxms()


				}

			},

			// 在线列表重
			// zaixianliebiaoquchong: function() {
			// 	var arr = [{
			// 		key: '01',
			// 		value: '乐乐'
			// 	}, {
			// 		key: '02',
			// 		value: '博博'
			// 	}, {
			// 		key: '01',
			// 		value: '淘淘'
			// 	}, {
			// 		key: '04',
			// 		value: '哈哈'
			// 	}, {
			// 		key: '01',
			// 		value: '乐乐'
			// 	}];


			// 	//  方法1：利用对象访问属性的方法，判断对象中是否存在key
			// 	var result = [];
			// 	var obj = {};
			// 	for (var i = 0; i < arr.length; i++) {
			// 		if (!obj[arr[i].key]) {
			// 			result.push(arr[i]);
			// 			obj[arr[i].key] = true;
			// 		}
			// 	}
			// 	console.log(result, 'peopleData61');



			// },




			//渲染上麦信息absoluteabsoluteabsolute
			shangmaiFn(data) {


				console.log(' 执行开始渲染上麦信息', data)
				// 循环 websocket 里有无   chatRoomBeckoning  心动值字段, 如果有渲染 到  麦上列表  
				for (let i = 0; i < data.queueList.length; i++) {

					if (data.queueList[i].chatRoomBeckoning) {

						if (data.queueList[i].chatRoomBeckoning.length > 10) {

							this.chatRoomBeckoning = JSON.parse(data.queueList[i].chatRoomBeckoning)
							this.maxSeatNum = JSON.parse(this.chatRoomBeckoning[this.chatRoomBeckoning.length -
									1])
								.maxSeatNum
							this.minSeatNum = JSON.parse(this.chatRoomBeckoning[this.chatRoomBeckoning.length -
									1])
								.minSeatNum
						} else {
							this.chatRoomBeckoning = []
						}
					}
				}
				// 麦下列表数据
				// this.peopleData = []
				this.peopleData1 = []
				this.peopleData2 = []
				this.peopleData3 = []
				this.peopleData4 = []

				for (var i in data.queueList) {

					if (data.queueList[i].chatSeatNum1) {


						// 						var li = JSON.parse(data.queueList[i].chatSeatNum1).info.seatState;
						// 						var lis = JSON.parse(data.queueList[i].chatSeatNum1).info.seat - 1;
						// 						var lif = JSON.parse(data.queueList[i].chatSeatNum1).info;


						//状态（seastate ）
						this.bhShangmaiFn(JSON.parse(data.queueList[i].chatSeatNum1).info.seatState, JSON
							.parse(data
								.queueList[i].chatSeatNum1).info.seat - 1, JSON.parse(data.queueList[i]
								.chatSeatNum1)
							.info)
					} else if (data.queueList[i].chatSeatNum2) {
						this.bhShangmaiFn(JSON.parse(data.queueList[i].chatSeatNum2).info.seatState, JSON
							.parse(data
								.queueList[i].chatSeatNum2).info.seat - 1, JSON.parse(data.queueList[i]
								.chatSeatNum2)
							.info)
					} else if (data.queueList[i].chatSeatNum3) {
						this.bhShangmaiFn(JSON.parse(data.queueList[i].chatSeatNum3).info.seatState, JSON
							.parse(data
								.queueList[i].chatSeatNum3).info.seat - 1, JSON.parse(data.queueList[i]
								.chatSeatNum3)
							.info)
					} else if (data.queueList[i].chatSeatNum4) {
						this.bhShangmaiFn(JSON.parse(data.queueList[i].chatSeatNum4).info.seatState, JSON
							.parse(data
								.queueList[i].chatSeatNum4).info.seat - 1, JSON.parse(data.queueList[i]
								.chatSeatNum4)
							.info)
					} else if (data.queueList[i].chatSeatNum5) {
						this.bhShangmaiFn(JSON.parse(data.queueList[i].chatSeatNum5).info.seatState, JSON
							.parse(data
								.queueList[i].chatSeatNum5).info.seat - 1, JSON.parse(data.queueList[i]
								.chatSeatNum5)
							.info)
					} else if (data.queueList[i].chatSeatNum6) {
						this.bhShangmaiFn(JSON.parse(data.queueList[i].chatSeatNum6).info.seatState, JSON
							.parse(data
								.queueList[i].chatSeatNum6).info.seat - 1, JSON.parse(data.queueList[i]
								.chatSeatNum6)
							.info)
					} else if (data.queueList[i].chatSeatNum7) {
						this.bhShangmaiFn(JSON.parse(data.queueList[i].chatSeatNum7).info.seatState, JSON
							.parse(data
								.queueList[i].chatSeatNum7).info.seat - 1, JSON.parse(data.queueList[i]
								.chatSeatNum7)
							.info)
					} else if (data.queueList[i].chatSeatNum8) {
						this.bhShangmaiFn(JSON.parse(data.queueList[i].chatSeatNum8).info.seatState, JSON
							.parse(data
								.queueList[i].chatSeatNum8).info.seat - 1, JSON.parse(data.queueList[i]
								.chatSeatNum8)
							.info)
					}
				}

				// 执行数据循环对比赋值
				// this.zhixingfug()
				//更新图片，更新图片（＋号、锁）
				console.log('执行结束上麦信息')
				setTimeout(function() {
					uni.hideLoading();
				}, 1000);


				// 上麦之后执行
				this.getChatroomMembers()


			},
			//进入用户提醒
			getInto(name) {
				// 过滤买下用户
				var _this = this

				// 更新获取 游客 管理员房主
				// _this.getChatroomMembers1()
				_this.getChatroomMembers()

				setTimeout(function() {

					_this.guolvmxms()

				}, 2500);


				this.getIntoTxt =
					"<li class='li'><p class='dj' style='display: inline;'></p>" +
					name +
					"<p class='style1' style='display: inline;'>进入聊天室，欢迎~</p></li>";

				this.liaottianTxtData.push(this.getIntoTxt)
			},



			//变换上麦 
			bhShangmaiFn(seastate, index, obj, type) {
				this.chatData[index] = obj
				uni.hideLoading()
			}

		}
	}
</script>

<style lang="scss">
	.zhong {
		display: flex;
		align-items: center;
		height: 50upx;
	}


	.sexs {
		transform: scale(0.8);
		margin-left: 20upx;
		width: 66upx;
		height: 28upx;
		line-height: 28upx;
		color: #FFFFFF;
		font-size: 18upx;
		text-align: center;
	}

	.sllb {
		.iynst {
			display: flex;
			justify-content: center;
			align-items: center;
			font-family: PingFangSC-Regular;
			font-size: 31upx;
			color: #9E9E9E;
			// margin-top: 180upx;
		}

	}


	// 私聊部分页面
	.siliaoss {

		height: 750upx;
		background: #FFFFFF;
		border-radius: 28upx 28upx 0 0;
		// border: 2upx  solid #007AFF;


		.bottom {
			width: 100%;
			background-color: #fff;
			border: 2rpx solid #ccc;
			height: 100upx;
			display: flex;
			align-items: center;
			// justify-content: center;

		}

		.dibu {

			position: fixed;
			bottom: 0;
			width: 100%;
			// height: 430upx;

		}



		.bofdj {

			width: 60upx;
			height: auto;
			-webkit-transform: rotate(180deg);
			-moz-transform: rotate(180deg);
			-o-transform: rotate(180deg);
			-ms-transform: rotate(180deg);
			transform: rotate(180deg);

		}


		.anniu {
			color: #FFFFFF;
			border-radius: 15upx;
			font-size: 25upx;
			background: #C0C0C0;
			padding: 10upx 20upx;
			margin-left: auto;
		}

		.annius {
			color: #FFFFFF;
			border-radius: 15upx;
			font-size: 25upx;
			background: #3387ff;
			padding: 10upx 20upx;
			margin-left: auto;
		}


		.bqico {
			width: 50upx;
			height: auto;
			margin-left: auto;
		}


		.input {
			border-radius: 15upx;
			border: 2upx;
			padding: 15upx;
			font-size: 25upx;
			width: 80%;

		}

		.chatinput-content {
			width: 77%;
			height: 70upx;
			border: 1px solid #bfbfbf;
			border-radius: 20upx;
			display: flex;
			align-items: center;

		}




		.content {
			background: #f1f1f1;
			// border: 1px solid #000000;
			// height: 100%;
			// background: #F1F1F1;
		}

		.shijianb {
			display: flex;
			align-items: center;
			justify-content: center;
		}

		.shijian {
			padding: 4rpx 10rpx;
			background: #D6D6D6;
			border-radius: 8rpx;
			font-size: 22rpx;
			color: #fff;
		}

		.nei {
			width: 100%;
			padding: 20upx 20upx;
			display: flex;
			flex-direction: row;
			justify-content: flex-start;
			color: #222;
		}

		.tx {
			width: 80upx;
			// height: 60upx;
			border-radius: 50%;
			height: auto;
			// border: 1upx solid #000000;0
		}

		.left-triangle {
			height: 0px;
			width: 0px;
			border-width: 20rpx;
			border-style: solid;
			border-color: transparent #fff transparent transparent;
			margin-top: 20rpx;
		}


		.right-triangle {
			height: 0px;
			width: 0px;
			border-width: 20rpx;
			border-style: solid;
			border-color: transparent transparent transparent #3387FF;
			margin-top: 20rpx;
		}

		.record-chatting-item-text {
			max-width: 70%;
			border-radius: 8rpx;
			background: #FFFFFF;
			// background-color: #3387FF;  
			padding: 16rpx;
			box-sizing: border-box;
			word-wrap: break-word;
			overflow: hidden;
			font-size: 32rpx;
			line-height: 48rpx;
		}
		.self {
			display: flex;
			flex-direction: row;
			justify-content: flex-end;

			color: #fff;
		}

		.bg {
			background: #3387ff;
		}

		// 语音播放
		.audio-wrapper {
			background-color: #fff;
			background: #3387ff;
			border-radius: 28rpx;
			display: flex;
			align-items: center;
			justify-content: space-between;
			padding: 0 20rpx;
			min-width: 30%;
			box-sizing: border-box;
			margin-left: -2px;
		}



	}





	// pk部分

	.sllb {


		.content-container {
			height: 650upx;
			// border: 2upx solid #007AFF;
		}



		.topbox {
			width: 95%;

			margin: 40upx auto;
			display: flex;
			align-items: center;
		}

		.touxiang {
			width: 100upx;
			height: auto;
			border-radius: 50%;


		}

		.titme {
			font-family: PingFangSC-Regular;
			font-size: 24upx;
			color: #9799B2;
			margin-left: auto;
			height: 80upx;
			width: 170upx;
			// border:2upx  solid #FF6034;
			transform: scale(0.8);
			text-align: right;

		}

		.text {
			font-family: PingFangSC-Regular;
			font-size: 24upx;
			color: #9799B2;

			width: 400upx;
			overflow: hidden;
			text-overflow: ellipsis;
			white-space: nowrap;


		}

		.name {
			font-family: PingFangSC-Regular;
			font-size: 26upx;
			color: #3B3F63;
			letter-spacing: 0;
			text-align: left;
			display: flex;
			align-items: center;
		}

		.yuandian {
			width: 15upx;
			height: 15upx;
			border-radius: 50%;
			background: red;

		}


	}




	.zbpk {
		// border: 2upx solid #007AFF;
	}



	.pkbj {
		width: 100%;
		height: 320upx;
		background-size: 100% 100%;
		background-image: url(https://webapp.test.shenghua6.cn/st/mini/static/img/xcxydy/pbj.png);
		text-align: center;
	}

	.pkauto {
		display: flex;
		height: 70%;
		align-items: center;
	}

	.wdmz {
		font-family: PingFangSC-Medium;
		font-size: 28upx;
		color: #FFFFFF;
		width: 180upx;
		overflow: hidden;
		white-space: nowrap;
		text-overflow: ellipsis;

		letter-spacing: 0;
	}

	.jieguot {
		width: 150upx;
		height: auto;
		position: absolute;
		// left: 80upx;
		z-index: 1000;
	}


	.pkduikang {
		width: 100%;
		height: 100upx;
		margin-top: -20upx;
		background-size: 100% 100%;
		// background-image: url(https://php.zgsj1.com/upload_video/20211115/e225cc89a7a6439707587b5b6792d7f6.png);

		background-image: url(https://webapp.test.shenghua6.cn/st/mini/static/img/xcxydy/tckb.png);


		text-align: center;

	}

	// <!-- 蓝色座位 -->
	// <!-- https://php.zgsj1.com/upload_video/20211115/91174d823581531356c5b263f068d7b5.png -->
	// <!-- 红色座位 -->
	// <!-- https://php.zgsj1.com/upload_video/20211115/68b959dc875ec25075dd9c58a8c95ee2.png -->

	.pkguanzhong {
		width: 100%;
		height: 120upx;
		// margin-top: -20upx;
		background-size: 100%;
		background-image: url(https://webapp.test.shenghua6.cn/st/mini/static/img/xcxydy/pkbgx.png);
		display: flex;
		align-items: center;
	}

	.pkllleft {
		width: 47%;
		// border: 2upx solid #7EF22E;
		display: flex;

	}


	// pk按钮
	.pkligjauto {
		width: 10%;
		height: 60upx;
		background-size: 100% 100%;
		background-image: url(https://webapp.test.shenghua6.cn/st/mini/static/img/xcxydy/pkx.png)
	}

	.pkgztx {
		width: 25%;
		height: 90upx;
		text-align: center;
		// border: 2upx solid #F0AD4E;
		display: flex;
		align-items: center;
		justify-content: center;
	}




	.gztxlb {
		width: 60upx;
		height: 60upx;
		border-radius: 50%;

	}

	.pkdy {
		margin: -25upx auto;
		transform: scale(0.8);
		color: #FFFFFF;
		background: #2448FE;
		// margin-top: -15upx;
		font-size: 12upx;
		width: 30upx;
		height: 30upx;
		display: flex;
		align-items: center;
		justify-content: center;
		border-radius: 50%;
		z-index: 99;
		position: relative;





	}


	.pkdys {



		margin: -25upx auto;
		transform: scale(0.8);
		color: #FFFFFF;
		background: #FE0D55;
		// margin-top: -15upx;
		font-size: 12upx;
		width: 30upx;
		height: 30upx;
		display: flex;
		align-items: center;
		justify-content: center;
		border-radius: 50%;
		z-index: 99;
		position: relative;



	}

	.pkgz {
		font-weight: 600;
		font-size: 30upx;
		text-align: center;
	}


	.gongxianbs {
		width: 100%;
		height: 800upx;
		background-size: 100% 100%;
		background-image: url(https://webapp.test.shenghua6.cn/st/mini/static/img/xcxydy/bdbb.png);

	}

	.lbulkjk {
		// border: 2upx solid #007AFF;
		width: 100%;
		display: flex;
	}

	// 贡献帮
	.gxbqs {
		// border: 2upx solid red;
		display: flex;
		height: 270upx;
	}


	.pxgxt {
		width: 50%;
		text-align: center;
	}


	.gxblist {
		display: flex;

		align-items: center;
		color: #FFFFFF;
		height: 110upx;
	}

	.gxitem {
		width: 33%;
		// border: 5upx solid yellow;
		text-align: center;
	}





	.gxqq {
		margin: 0 auto;
		width: 120upx;
		height: 120upx;
		padding: 18upx;
		background-size: 100% 100%;
		background-image: url(https://webapp.test.shenghua6.cn/st/mini/static/img/xcxydy/adf.png);


	}



	.data_progress__1PKMR {
		display: flex;
		align-items: center;
		margin: 0 auto;
		width: 97%;
		height: 40rpx;
		margin-top: 10rpx;
		background: #F15D5D;
		border-radius: 16rpx;
		overflow: hidden;



		.data_proLeft__1gtzQ {
			transition: width 2s;
			width: 50%;
			height: 100%;

			// background: linear-gradient(-40deg, transparent 17px, #067ee7 0);
			background: linear-gradient(0, transparent 0px, #067ee7 0);
			border-top-left-radius: 16rpx;
			border-bottom-left-radius: 16rpx;
		}
	}

	.pkt {
		width: 100%;
		// border: 1upx solid #fff;
		display: flex;
		margin-top: -40upx;
		color: #FFFFFF;
		font-size: 26upx;
	}

	.pkbdname {
		color: #FFFFFF;
		margin: 0 auto;
		width: 60%;
		// padding:5upx 20upx;
		display: flex;
		justify-content: center;
		font-size: 18upx;
		align-items: center;
		height: 13upx;
		padding: 18upx;
		background-size: 100% 100%;
		background-image: url(https://webapp.test.shenghua6.cn/st/mini/static/img/xcxydy/idbgx.png);
	}



	// .pkbdnames {
	// 	color: #FFFFFF;
	// 	margin: 0 auto;
	// 	width: 70%;
	// 	// padding:5upx 20upx;
	// 	display: flex;
	// 	justify-content: center;
	// 	font-size: 18upx;
	// 	align-items: center;
	// 	height: 16upx;
	// 	padding: 18upx;
	// 	background-size: 100% 100%;
	// 	background-image: url(https://php.zgsj1.com/upload_video/20211116/3cc53c430ebe1fe837c5205fb7b1fae2.png);
	// }


	.pkbdname {
		color: #FFFFFF;
		margin: 0 auto;
		width: 190upx;
		// padding:5upx 20upx;
		display: flex;
		justify-content: center;
		font-size: 18upx;
		align-items: center;
		height: 13upx;
		padding: 18upx;
		background-size: 100% 100%;
		background-image: url(https://webapp.test.shenghua6.cn/st/mini/static/img/xcxydy/idbgx.png);

		white-space: nowrap;
		/*内容超宽后禁止换行显示*/

		//             overflow: hidden;/*超出部分隐藏*/

		//             text-overflow:ellipsis;/*文字超出部分以省略号显示*/

	}


	.pkzhi {
		font-family: PingFangSC-Medium;
		font-size: 20upx;
		color: #FFE620;
		letter-spacing: 0;
		margin-top: 10upx;
	}






	.zhiboimgtx {
		width: 170upx;
		height: 170upx;
		border-radius: 50%;
		z-index: 9999;
	}

	.zjikdti {
		height: 300upx;
		display: flex;
		justify-content: center;
		align-items: center;
		// border: 2upx solid #007AFF;
	}




	.scroll-view_H {
		white-space: nowrap;
		width: 100%;


		.scroll-view-item_H {
			display: inline-block;
			width: 15%;
			height: 100upx;
			text-align: center;
			font-size: 26upx;
			color: #666;
			// background: yellow;
		}
	}

	.grbzlwu {
		width: 93%;
		margin: 0 auto;
		height: 100upx;
		display: flex;
		background-size: 100% 100%;
		background-image: url(https://webapp.test.shenghua6.cn/st/mini/static/img/xcxydy/bzlqu.png);
	}

	.grbottom {
		width: 100%;
		height: 80upx;
		background-size: 100% 100%;
		background-image: url(https://webapp.test.shenghua6.cn/st/mini/static/img/xcxydy/anniudise.png);
		position: absolute;
		bottom: 0;
		display: flex;
		align-items: center;
		justify-content: center;
	}

	.botnegr {
		flex: 1;
		text-align: center;
	}


	.tu0 {
		width: 75upx;
		height: 75upx;
		margin: 0 auto;
		z-index: 999;
		border-radius: 20upx;
		border: 2upx solid #FFFFFF;
	}


	.tu1 {
		width: 55upx;
		height: 55upx;
		z-index: 666;
		margin-left: -35upx;
		border-radius: 20upx;
		border: 2upx solid #FFFFFF;
		opacity: 0.8;
	}

	.tu2 {
		width: 35upx;
		height: 35upx;
		z-index: 333;
		opacity: 0.6;
		margin-left: -22upx;
		border-radius: 20upx;
		border: 2upx solid #FFFFFF;
	}



	.grqms {
		width: 95%;
		margin: 0 auto;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;

		font-family: PingFangSC-Regular;
		font-size: 22upx;
		color: #181821;
	}

	.grid {
		font-size: 28upx;
		color: #666;
	}

	.trqg {
		font-size: 22upx;
		color: #B0B0B0;
	}

	.grzlname {
		font-family: PingFangSC-Medium;
		font-size: 30upx;
		color: #181821;
		display: flex;
		align-items: center;
	}


	.gerenziliaobj {
		border-radius: 30upx 30upx 0 0;
		height: 460upx;
		background: #Ffffff;
		background-size: 100% 100%;
		background-image: url(https://webapp.test.shenghua6.cn/st/mini/static/img/xcxydy/ziliakuandi.png);

	}

	.ansi {
		border: 2upx solid #fff;
		border-radius: 15upx;
		width: 60upx;
		margin-left: 5%;
		text-align: center;
		padding: 6upx;
	}

	.canvasimg {
		position: fixed;
	}

	.gensuidh {

		width: 100%;
		text-align: center;
		position: fixed;
		z-index: 999;


	}

	.btntt {
		width: 514upx;
		height: 77upx;
		line-height: 77upx;
		text-align: center;
		background-image: linear-gradient(-44deg, #7078FF 0%, #B1A4FF 100%, #B1A4FF 100%);
		/* box-shadow: 0 8upx 9upx 0 rgba(255, 255, 255, 0.72), 0 14upx 9upx 0 #DEF2FF, inset 0 0 9upx 4upx rgba(250, 230, 255, 0.16); */
		border-radius: 14upx;
		margin: 0 auto;
		font-size: 32upx;
		color: #FFFFFF;
		margin-top: -160upx;
	}




	.shengtu {
		display: flex;
		justify-content: center;
		align-items: center;
	}

	.chatRoom {
		width: 100%;
		height: 100%;
		position: relative;
		// background: #8686ff url('@/static/img/chatRoomDetails/bg@2x.png') no-repeat;
	}

	.meilis {
		color: #FFFFFF;
		font-size: 20upx;
		transform: scale(0.5);
		border: 2upx solid #FFFFFF;
		border-radius: 25upx;
		display: flex;
		align-items: center;
		margin-top: 32upx;
		position: absolute;

	}



	.meili {
		width: 130upx;
		height: 26upx;
		border-radius: 13upx;
		font-size: 20upx;
		font-width: 600;
		color: #FFF7CC;
		background: rgba(0, 0, 0, 0.6);
		display: flex;
		align-items: center;
		margin: 0 auto;
		margin-left: 10upx;
		margin-top: -15upx;
		position: absolute;
		top: 33px;
		z-index: 1;
		left: 20px;
		transform: scale(0.6);
		border: 1px solid #FFFFFF;
	}

	body {
		position: fixed;
		width: 100%;
		height: 100%;
		overflow: hidden;

	}


	.sex {
		width: 66upx;
		height: 28upx;
		line-height: 28upx;
		color: #FFFFFF;
		font-size: 18upx;
		text-align: center;
	}

	.pa {
		position: absolute;
	}



	.roomId {
		border: 2upx solid #007AFF;
		font-size: 20upx;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
		transform: scale(0.8)
	}

	.hBg {
		width: 60upx;
		height: 60upx;
		border-radius: 50%;
		margin-right: 20upx;
		margin-left: 20upx;
	}

	.shareBtn {
		width: 100upx;
		height: 50upx;
		background: rgba(0, 0, 0, 0.2);
		position: fixed;
		right: 20upx;
		bottom: 200upx;
		color: #FFFFFF;
		font-size: 28upx;
		text-align: center;
		line-height: 50upx;
		border-radius: 25upx;
	}

	.catBoxItem1 {

		height: 70upx;
		border-radius: 35upx;
		display: flex;
		align-items: center;

		background: rgba(0, 0, 0, 0.2);

		// padding-right: 10upx;
	}

	.playCon {
		width: 136upx;
		height: 42upx;
		font-size: 24upx;
		color: #FFFFFF;
		display: flex;
		align-items: center;
		background: rgba(0, 0, 0, 0.2);
		border-radius: 21upx;
		margin-left: 80upx;
		margin-top: 15upx;
		margin-bottom: 52upx;
		z-index: 9999;
	}

	.playimg {
		width: 40upx;
		height: 37upx;
		margin-left: 9upx;
		margin-right: 14upx;
	}

	.catBoxItem1 p {
		/* text-align: center; */
		color: #fff;
	}

	.catBoxItem2 {
		text-align: center;
		padding-top: 45upx;
		height: 145upx;
	}

	/*头像*/
	.headPortrait img {
		width: 79upx;
		height: 79upx;
		border: 4upx solid rgba(255, 255, 255, 0.5);
		border-radius: 100%;
		background: #ccc;
	}

	/*风车*/
	.fc {
		position: absolute;
		bottom: 183upx;
		right: 20upx;
		z-index: 2;
	}

	.fc img {
		width: 287upx;
		height: 261upx;
	}

	.pinkBox {
		font-size: 14upx;
		display: inline-block;
		height: 25upx;
		background: #f250fb;
		line-height: 25upx;
		border-radius: 10upx;
		padding: 2upx 10upx;
	}

	.catBoxItem3 {
		height: 320upx;

	}

	.catBoxItem3 li {

		float: left;
		width: 25%;
		height: 117upx;
		text-align: center;
		padding-top: 28upx;
	}

	/* .catBoxItem3 li:nth-child(8) p .tx {
		background-image: url('@/static/img/chatRoomDetails/lb.png');
	} */

	/* .catBoxItem3 li:nth-child(8) p:nth-child(2) {
		color: #ffe051;
	} */

	.catBoxItem3 .tx {
		display: inline-block;
		width: 95upx;
		height: 95upx;
		border-radius: 100%;
		color: #fff;
		font-size: 50upx;
		line-height: 59upx;
		background-size: 100%;


		background-repeat: no-repeat;
	}

	.catBoxItem3 .nichen {
		height: 50upx;
		color: #fff;
		font-size: 17upx;
		padding-top: 2upx;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;


	}

	.footerFixed {
		display: flex;

		width: 100%;
		z-index: 111;

		.liaotian {
			width: 257upx;
			height: 66upx;
			border-radius: 33upx;
			display: flex;
			align-items: center;
			background-color: rgba(0, 0, 0, 0.2);
			margin-left: 24upx;
			display: flex;
			position: fixed;
			bottom: 15upx;
			z-index: 9;

			.input {
				flex: 1;

			}
		}

		.biaoqing {
			width: 43upx;
			height: 43upx;
			margin-left: 11upx;
		}

		.input {
			color: #FFFFFF;
			margin-left: 18upx;
			font-size: 28upx;
		}

		.img {
			width: 66upx;
			height: 66upx;
			margin-right: 24upx;
		}
	}


	/*弹出框*/
	.popupBox {
		width: 100%;
		height: 100%;
		background: #fff;
		position: fixed;
		top: 0;
		left: 0;
		z-index: 999;
		color: #ff3361;
		text-align: center;
		font-size: 28upx;
		font-weight: bold;
		display: flex;
		align-items: center;
		justify-content: center;

	}

	.downBtn {
		bottom: 21upx;
		display: inline-block;
		width: 460upx;
		height: 66upx;
		line-height: 66upx;
		background: linear-gradient(to right, #ff2461, #ff6661);
		;
		text-align: center;
		font-size: 29upx;
		color: #fff;
		border-radius: 14upx;
		left: 50%;
		margin-left: -230upx;
	}

	.popupBoxTx {
		width: 143upx;
		height: 143upx;
		background-color: #fff;
		position: absolute;
		top: -74upx;
		border-radius: 100%;
		left: 50%;
		margin-left: -74upx;
		border: 5upx solid #fff;
		background-size: cover;
		overflow: hidden;
	}



	.zsNum {
		position: absolute;
		top: 4upx;
		right: 70upx;
		display: inline-block;
		color: #fff;
		width: 390upx;
		height: 65upx;
		line-height: 80upx;
		text-align: right;
		font-size: 14upx;
	}

	/*发送消息*/
	.messageBox {
		position: absolute;
		z-index: 3;
		/* bottom: 80upx; */
		left: 16upx;
		height: 400upx;
		/* width: 5.35upx;*/
		overflow: hidden;
		overflow-y: scroll;
	}

	.messageBox ul {
		width: 535upx;
		overflow: hidden;
	}



	.suo .tx {
		background: none !important;
	}

	body {
		overflow: hidden
	}

	.enterBox {
		position: absolute;
		bottom: 330upx;
		left: 16upx;
		height: 220upx;
		overflow: hidden;
		overflow-y: scroll;
		z-index: 3
	}

	.enterBox ul li {
		position: relative;
		display: table;
		background: rgba(0, 0, 0, .5);
		color: #fff;
		padding: 0 10upx;
		margin: 10upx 0;
		min-height: 35upx;
		line-height: 35upx;
		border-radius: 8upx;
		font-size: 22upx
	}

	.style1 {
		color: #ffae27;
		padding: 0 10upx;
	}

	#bodymovin {
		/*height: 100%;*/
		display: block;
		overflow: hidden;
		transform: translate3d(0, 0, 0);
		/*text-align:center;*/
		opacity: 1;
		/*background: red;*/
		position: fixed;
		text-align: left;
		left: 0;
		top: 0;
		z-index: 10;
		/*top:0;*/
		/*left:0;*/
		/*right: 0;*/
		/*bottom: 0;*/
	}

	.chatRoom /deep/ .vipNum {
		display: inline-block;
		width: 48upx;
		height: 24upx;
		background-size: contain;
		background-repeat: no-repeat;
		vertical-align: middle;
		margin-right: 2upx;
	}

	.chatRoom /deep/ .bqIcon {
		height: 45upx;
		vertical-align: bottom;
	}

	.chatRoom /deep/ .hb {
		/* float: right; */
		width: 40upx;
		margin-left: 10upx;
	}

	.hBgImg {
		width: 100%;
		height: 100%;
		display: block;
	}


	.cf {
		color: #fff;
	}

	.f23 {
		font-size: .23rem;
	}

	.pt8 {
		padding-top: .08rem;
	}

	.sharePop {
		button::after {
			border: none;
			background: none;
		}

		button {
			width: 100%;
			background: none;
			width: 100%;
			margin: 0;
			padding: 0;
			font-size: 28upx;
			display: flex;
			outline: none;
		}

	}






	.btn-hover {
		background-color: transparent;
	}

	.chatRoom {
		overflow: hidden;
	}


	.chatRoom /deep/ .li {
		display: table;
		background: rgba(0, 0, 0, 0.5);
		color: #fff;
		padding: 0 10upx;
		margin: 10upx 0;
		height: 45upx;
		line-height: 45upx;
		border-radius: 18upx;
		font-size: 22upx;


	}

	.chatRoom /deep/ .li .pre {

		float: left;
		display: inline;

		white-space: pre-wrap;
		word-wrap: break-word;
		overflow: hidden;
		text-overflow: ellipsis;

	}


	.chatRoom /deep/ .style1 {
		padding: 0 10upx
	}

	.content {
		width: 535upx;
		height: 100%;
		margin-left: 20upx;
	}

	.flex-column {
		display: flex;
		flex-direction: column;
	}

	.flex-center {
		align-items: center;
		justify-content: center;
	}

	.flex-1 {
		flex: 1;
	}

	.scroll-view {
		overflow: hidden;
	}








	.mai {
		// max-width: 150upx;		
		height: 88upx;
		border-radius: 44upx;
		background: rgba(0, 0, 0, 0.2);
		font-size: 32upx;
		color: #FFFFFF;
		display: flex;

		align-items: center;
		padding-left: 13upx;
		padding-right: 30upx;
		margin-left: auto;
		margin-right: 15upx;
		margin-bottom: 43upx;


		.miDown {
			font-size: 20upx;
			color: #34DCC2;
		}
	}

	.slide-box {
		flex: 1;

		// float: right;
		margin-left: auto;
		display: -webkit-box;
		overflow-x: scroll;
		// 让滚动条产生回弹/
		-webkit-overflow-scrolling: touch;
		overflow-style: none;
		overflow: scrollbars-none;

	}

	.right {
		width: 80upx;
		text-align: center;
		// border: 1px solid #000000;
	}


	/* 隐藏下方的滚动条 */
	.slide-box::-webkit-scrollbar {
		display: none;
		background-color: transparent;
	}

	.slide-item {
		width: 62upx;
		height: 62upx;
		border-radius: 50%;
		margin-right: 12upx;
		position: relative;

		.img {
			width: 100%;
			height: 100%;
			display: block;
			border-radius: 12upx;
			position: absolute;
		}
	}

	.dashang {
		text-align: center;
		font-size: 28upx;

		li {
			line-height: 60upx;
			height: 60upx;
		}

		.li3 {
			border-radius: 15upx;
			background-color: #FFFFFF;
			margin-top: 20upx;
			margin-bottom: 20upx;
		}
	}

	.chatRoom /deep/ .u-drawer-bottom {
		background: none !important;
	}

	.chatRoom /deep/ .u-mode-center-box {
		background: none !important;
	}

	// 
	.chatRoom /deep/ .u-mask {
		background: none !important;
	}

	.wanImg {
		width: 598upx;
		height: 175upx;
		display: block;
		margin: 0 auto;
	}

	.wanTxt {
		width: 450upx;
		margin: 0 auto;
		font-size: 24upx;
		color: #666666;
		background: #FFFFFF;
		padding: 40upx 40upx 50upx;
		margin-top: -65upx;
		border-radius: 0 0 29upx 29upx;
	}

	.onlineImg {
		width: 106.5%;
		margin-left: -3.5%;
	}

	.onlineListAll {
		padding-top: 50upx;
		font-size: 26upx;
		color: #FFFFFF;

		.onlineList {
			width: 700upx;
			height: 124upx;
			margin: 0 auto;
			background-image: linear-gradient(90deg, #3E385F 0%, #1D1A31 99%);
			border: 1px solid #64688A;
			border-radius: 62upx;
			margin-bottom: 20upx;
			display: flex;
			align-items: center;
		}

		.head {
			width: 96upx;
			height: 96upx;
			border-radius: 50%;
			border: 2px solid #FFFFFF;
			margin-left: 14upx;
		}

		ul {
			margin-left: 31upx;
		}
	}

	.sharePop {
		.shareImg {
			width: 600upx;
			height: 370upx;
		}

		.shareList {
			width: 80%;
			position: absolute;
			top: 50%;
			left: 50%;
			transform: translateX(-50%);
			z-index: 111;
			display: flex;
			font-size: 22upx;
			color: #181821;
		}

		ul {
			width: 100%;
			text-align: center;
		}

		.shareIcon {
			width: 80upx;
			height: 80upx;
			display: block;
			margin: 0 auto;
		}
	}

	.share1 {
		width: 566upx;
		background: #F0EFF8;
		border-radius: 16upx;
		padding: 26upx 0;

		.hgimg {
			width: 514upx;
			height: 514upx;
			border: 1px solid #979797;
			border-radius: 6upx;
			margin: 0 auto;
			display: block;
			margin-bottom: 26upx;
		}

		.li1 {
			font-size: 36upx;
			color: #181821;
		}

		.li2 {
			font-size: 24upx;
			color: #181821;
		}

		.li3 {
			font-size: 20upx;
			color: #999999;
		}

		.btn {
			width: 514upx;
			height: 77upx;
			line-height: 77upx;
			text-align: center;
			background-image: linear-gradient(-44deg, #7078FF 0%, #B1A4FF 100%, #B1A4FF 100%);
			box-shadow: 0 8upx 9upx 0 rgba(255, 255, 255, 0.72), 0 14upx 9upx 0 #DEF2FF, inset 0 0 9upx 4upx rgba(250, 230, 255, 0.16);
			border-radius: 14upx;
			margin: 0 auto;
			font-size: 32upx;
			color: #FFFFFF;
			margin-top: 16upx;
		}
	}

	.gift {
		color: #FFFFFF;
		background: #181821;

		.peolist {
			display: flex;
			align-items: center;

		}

		.scroll {
			width: 100%;
			height: 104upx;
			overflow: hidden;
			white-space: nowrap;
		}

		.slide-item1 {
			width: 70upx;
			height: 100%;
			display: inline-block;
			margin-left: 20upx;
			margin-top: 24upx;
		}

		.img {
			width: 66upx;
			height: 66upx;
			border: 2upx solid #eee;
			border-radius: 50%;
		}

		.txt {
			background: rgba(0, 0, 0, 0.6);
			border: 2upx solid #eee;
			border-radius: 10upx;
			font-size: 24upx;
			padding: 0 7upx;
			transform: scale(0.7);
			margin-top: -34upx;
			text-align: center;
		}

		.peoactive {
			border: 2upx solid #DC446B;
		}

		.peoactive1 {
			border: 2upx solid #DC446B;
			background: #DC446B;
		}

		.btn {
			width: 64upx;
			height: 38upx;
			line-height: 38upx;
			border: 1px solid #F4DC92;
			border-radius: 23upx;
			text-align: center;
			font-size: 24upx;
			margin-top: 24upx;

		}

		.btns {
			background: #F0AD4E;


		}


		.giftlist {
			.tab {
				display: flex;
				font-size: 24upx;
				margin-left: 39upx;
				margin-top: 31upx;
				margin-bottom: 40upx;
			}

			.active {
				color: #DC446B;
			}

			.swiper-item {
				width: 160upx;
				height: 170upx;
				border: 1px solid #181821;
				border-radius: 10upx;
				overflow: hidden;
				position: relative;
			}

			.title {
				background: #181821;
				width: 100%;
				position: absolute;
				bottom: 0;
				height: 40%;
			}

			.active1 {
				border: 1px solid #DC446B;
			}

			.active2 {
				background: #DC446B;
			}
		}

		.giftnum {
			li {
				width: 196upx;
				height: 50upx;
				line-height: 50upx;
				text-align: center;
				font-size: 24upx;
				color: #FFFFFF;
				margin: 0 auto;
			}

			.active {
				background: #F4DC92;
				color: #121219;
				border-radius: 8upx;
			}
		}
	}
</style>
